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

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
« no previous file with comments | « chrome/browser/ui/views/theme_install_bubble_view.cc ('k') | views/controls/menu/menu_host_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_host.cc
===================================================================
--- views/controls/menu/menu_host.cc (revision 83020)
+++ 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);
}
« no previous file with comments | « chrome/browser/ui/views/theme_install_bubble_view.cc ('k') | views/controls/menu/menu_host_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698