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

Unified Diff: ui/base/clipboard/clipboard_win.cc

Issue 10315012: Added base::win::InitializeWindowClass() wrapper to make sure that window classes are properly asso… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WNDCLASSEXW -> WNDCLASSEX Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/clipboard/clipboard_win.cc
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 8b2eaea388de9bff3ec900013219beee2bbc49d8..3fa071f79d9d51d6f41433bbd91d18f98807d4e9 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -188,12 +188,13 @@ Clipboard::FormatType Clipboard::FormatType::Deserialize(
Clipboard::Clipboard() : create_window_(false) {
if (MessageLoop::current()->type() == MessageLoop::TYPE_UI) {
// Make a dummy HWND to be the clipboard's owner.
- WNDCLASSEX wcex = {0};
- wcex.cbSize = sizeof(WNDCLASSEX);
- wcex.lpfnWndProc = base::win::WrappedWindowProc<ClipboardOwnerWndProc>;
- wcex.hInstance = GetModuleHandle(NULL);
- wcex.lpszClassName = L"ClipboardOwnerWindowClass";
- ::RegisterClassEx(&wcex);
+ WNDCLASSEX window_class;
+ base::win::InitializeWindowClass(
+ L"ClipboardOwnerWindowClass",
+ &base::win::WrappedWindowProc<ClipboardOwnerWndProc>,
+ 0, 0, 0, NULL, NULL, NULL, NULL, NULL,
+ &window_class);
+ ::RegisterClassEx(&window_class);
create_window_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698