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

Unified Diff: views/controls/menu/menu_host.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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: views/controls/menu/menu_host.cc
===================================================================
--- views/controls/menu/menu_host.cc (revision 82649)
+++ views/controls/menu/menu_host.cc (working copy)
@@ -22,10 +22,6 @@
NativeMenuHost::CreateNativeMenuHost(this))),
submenu_(submenu),
destroying_(false) {
- Widget::CreateParams params;
- params.type = Widget::CreateParams::TYPE_MENU;
- params.has_dropshadow = true;
- GetWidget()->SetCreateParams(params);
}
MenuHost::~MenuHost() {
@@ -35,7 +31,16 @@
const gfx::Rect& bounds,
View* contents_view,
bool do_capture) {
- native_menu_host_->InitMenuHost(parent, bounds);
+ Widget::CreateParams params;
+ params.type = Widget::CreateParams::TYPE_MENU;
+ params.has_dropshadow = true;
+#if defined(OS_WIN)
+ params.parent = parent;
+#elif defined(TOOLKIT_USES_GTK)
+ params.parent = GTK_WIDGET(parent);
+#endif
+ params.bounds = bounds;
+ GetWidget()->Init(params);
GetWidget()->SetContentsView(contents_view);
ShowMenuHost(do_capture);
}

Powered by Google App Engine
This is Rietveld 408576698