OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Many of these functions are based on those found in | 5 // Many of these functions are based on those found in |
6 // webkit/port/platform/PasteboardWin.cpp | 6 // webkit/port/platform/PasteboardWin.cpp |
7 | 7 |
8 #include "base/clipboard.h" | 8 #include "base/clipboard.h" |
9 | 9 |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
11 #include <shellapi.h> | 11 #include <shellapi.h> |
12 | 12 |
13 #include "base/clipboard_util.h" | 13 #include "base/clipboard_util.h" |
| 14 #include "base/file_path.h" |
| 15 #include "base/gfx/size.h" |
14 #include "base/lock.h" | 16 #include "base/lock.h" |
15 #include "base/logging.h" | 17 #include "base/logging.h" |
16 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
17 #include "base/shared_memory.h" | 19 #include "base/shared_memory.h" |
18 #include "base/string_util.h" | 20 #include "base/string_util.h" |
19 | 21 |
20 namespace { | 22 namespace { |
21 | 23 |
22 // A scoper to manage acquiring and automatically releasing the clipboard. | 24 // A scoper to manage acquiring and automatically releasing the clipboard. |
23 class ScopedClipboard { | 25 class ScopedClipboard { |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 HWND Clipboard::GetClipboardWindow() const { | 643 HWND Clipboard::GetClipboardWindow() const { |
642 if (!clipboard_owner_ && create_window_) { | 644 if (!clipboard_owner_ && create_window_) { |
643 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", | 645 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", |
644 L"ClipboardOwnerWindow", | 646 L"ClipboardOwnerWindow", |
645 0, 0, 0, 0, 0, | 647 0, 0, 0, 0, 0, |
646 HWND_MESSAGE, | 648 HWND_MESSAGE, |
647 0, 0, 0); | 649 0, 0, 0); |
648 } | 650 } |
649 return clipboard_owner_; | 651 return clipboard_owner_; |
650 } | 652 } |
OLD | NEW |