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" |
| 9 |
8 #include <shlobj.h> | 10 #include <shlobj.h> |
9 #include <shellapi.h> | 11 #include <shellapi.h> |
10 | 12 |
11 #include "base/clipboard.h" | |
12 | |
13 #include "base/clipboard_util.h" | 13 #include "base/clipboard_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "base/shared_memory.h" |
16 #include "base/string_util.h" | 17 #include "base/string_util.h" |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 // A scoper to manage acquiring and automatically releasing the clipboard. | 21 // A scoper to manage acquiring and automatically releasing the clipboard. |
21 class ScopedClipboard { | 22 class ScopedClipboard { |
22 public: | 23 public: |
23 ScopedClipboard() : opened_(false) { } | 24 ScopedClipboard() : opened_(false) { } |
24 | 25 |
25 ~ScopedClipboard() { | 26 ~ScopedClipboard() { |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 HWND Clipboard::GetClipboardWindow() const { | 641 HWND Clipboard::GetClipboardWindow() const { |
641 if (!clipboard_owner_ && create_window_) { | 642 if (!clipboard_owner_ && create_window_) { |
642 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", | 643 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", |
643 L"ClipboardOwnerWindow", | 644 L"ClipboardOwnerWindow", |
644 0, 0, 0, 0, 0, | 645 0, 0, 0, 0, 0, |
645 HWND_MESSAGE, | 646 HWND_MESSAGE, |
646 0, 0, 0); | 647 0, 0, 0); |
647 } | 648 } |
648 return clipboard_owner_; | 649 return clipboard_owner_; |
649 } | 650 } |
OLD | NEW |