Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: ui/base/clipboard/clipboard_win.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/ime/win/tsf_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/base/clipboard/clipboard.h" 8 #include "ui/base/clipboard/clipboard.h"
9 9
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const std::string& serialization) { 180 const std::string& serialization) {
181 int clipboard_format = -1; 181 int clipboard_format = -1;
182 if (!base::StringToInt(serialization, &clipboard_format)) { 182 if (!base::StringToInt(serialization, &clipboard_format)) {
183 NOTREACHED(); 183 NOTREACHED();
184 return FormatType(); 184 return FormatType();
185 } 185 }
186 return FormatType(clipboard_format); 186 return FormatType(clipboard_format);
187 } 187 }
188 188
189 Clipboard::Clipboard() : create_window_(false) { 189 Clipboard::Clipboard() : create_window_(false) {
190 if (MessageLoop::current()->type() == MessageLoop::TYPE_UI) { 190 if (base::MessageLoop::current()->type() == base::MessageLoop::TYPE_UI) {
191 // Make a dummy HWND to be the clipboard's owner. 191 // Make a dummy HWND to be the clipboard's owner.
192 WNDCLASSEX window_class; 192 WNDCLASSEX window_class;
193 base::win::InitializeWindowClass( 193 base::win::InitializeWindowClass(
194 L"ClipboardOwnerWindowClass", 194 L"ClipboardOwnerWindowClass",
195 &base::win::WrappedWindowProc<ClipboardOwnerWndProc>, 195 &base::win::WrappedWindowProc<ClipboardOwnerWndProc>,
196 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 196 0, 0, 0, NULL, NULL, NULL, NULL, NULL,
197 &window_class); 197 &window_class);
198 ::RegisterClassEx(&window_class); 198 ::RegisterClassEx(&window_class);
199 create_window_ = true; 199 create_window_ = true;
200 } 200 }
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", 873 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass",
874 L"ClipboardOwnerWindow", 874 L"ClipboardOwnerWindow",
875 0, 0, 0, 0, 0, 875 0, 0, 0, 0, 0,
876 HWND_MESSAGE, 876 HWND_MESSAGE,
877 0, 0, 0); 877 0, 0, 0);
878 } 878 }
879 return clipboard_owner_; 879 return clipboard_owner_;
880 } 880 }
881 881
882 } // namespace ui 882 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/ime/win/tsf_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698