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

Unified Diff: ui/views/controls/menu/native_menu_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: CR feedback and rebased. Created 8 years, 7 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
« no previous file with comments | « ui/base/win/window_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/native_menu_win.cc
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index 3af5ca09254ac045fd6c212171baee9bafbf3d0e..ba60cabc46264c4ae985b95a1ce9da53b6e40ef3 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -96,14 +96,21 @@ class NativeMenuWin::MenuHostWindow {
if (registered)
return;
- WNDCLASSEX wcex = {0};
- wcex.cbSize = sizeof(WNDCLASSEX);
- wcex.style = CS_DBLCLKS;
- wcex.lpfnWndProc = base::win::WrappedWindowProc<&MenuHostWindowProc>;
- wcex.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_WINDOW+1);
- wcex.lpszClassName = kWindowClassName;
- ATOM clazz = RegisterClassEx(&wcex);
- DCHECK(clazz);
+ WNDCLASSEX window_class;
+ base::win::InitializeWindowClass(
+ kWindowClassName,
+ &base::win::WrappedWindowProc<MenuHostWindowProc>,
+ CS_DBLCLKS,
+ 0,
+ 0,
+ NULL,
+ reinterpret_cast<HBRUSH>(COLOR_WINDOW+1),
+ NULL,
+ NULL,
+ NULL,
+ &window_class);
+ ATOM clazz = RegisterClassEx(&window_class);
+ CHECK(clazz);
registered = true;
}
« no previous file with comments | « ui/base/win/window_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698