| Index: views/controls/menu/menu_host_gtk.cc
|
| ===================================================================
|
| --- views/controls/menu/menu_host_gtk.cc (revision 83020)
|
| +++ views/controls/menu/menu_host_gtk.cc (working copy)
|
| @@ -23,8 +23,7 @@
|
| // MenuHostGtk, public:
|
|
|
| MenuHostGtk::MenuHostGtk(internal::NativeMenuHostDelegate* delegate)
|
| - : WidgetGtk(WidgetGtk::TYPE_POPUP),
|
| - did_input_grab_(false),
|
| + : did_input_grab_(false),
|
| delegate_(delegate) {
|
| }
|
|
|
| @@ -34,16 +33,6 @@
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // MenuHostGtk, NativeMenuHost implementation:
|
|
|
| -void MenuHostGtk::InitMenuHost(gfx::NativeWindow parent,
|
| - const gfx::Rect& bounds) {
|
| - make_transient_to_parent();
|
| - WidgetGtk::Init(GTK_WIDGET(parent), bounds);
|
| - // Make sure we get destroyed when the parent is destroyed.
|
| - gtk_window_set_destroy_with_parent(GTK_WINDOW(GetNativeView()), TRUE);
|
| - gtk_window_set_type_hint(GTK_WINDOW(GetNativeView()),
|
| - GDK_WINDOW_TYPE_HINT_MENU);
|
| -}
|
| -
|
| void MenuHostGtk::StartCapturing() {
|
| DCHECK(!did_input_grab_);
|
|
|
| @@ -92,6 +81,15 @@
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // MenuHostGtk, WidgetGtk overrides:
|
|
|
| +void MenuHostGtk::InitNativeWidget(const Widget::CreateParams& params) {
|
| + make_transient_to_parent();
|
| + WidgetGtk::InitNativeWidget(params);
|
| + // Make sure we get destroyed when the parent is destroyed.
|
| + gtk_window_set_destroy_with_parent(GTK_WINDOW(GetNativeView()), TRUE);
|
| + gtk_window_set_type_hint(GTK_WINDOW(GetNativeView()),
|
| + GDK_WINDOW_TYPE_HINT_MENU);
|
| +}
|
| +
|
| // TODO(beng): remove once MenuHost is-a Widget
|
| RootView* MenuHostGtk::CreateRootView() {
|
| return delegate_->CreateRootView();
|
|
|