diff options
Diffstat (limited to 'views/controls/menu/menu_host.h')
-rw-r--r-- | views/controls/menu/menu_host.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/views/controls/menu/menu_host.h b/views/controls/menu/menu_host.h index a33f445..0b5417b 100644 --- a/views/controls/menu/menu_host.h +++ b/views/controls/menu/menu_host.h @@ -20,17 +20,14 @@ class SubmenuView; class View; class Widget; -// SubmenuView uses a MenuHost to house the SubmenuView. MenuHost typically -// extends the native Widget type, but is defined here for clarity of what -// methods SubmenuView uses. +// SubmenuView uses a MenuHost to house the SubmenuView. // // SubmenuView owns the MenuHost. When SubmenuView is done with the MenuHost // |DestroyMenuHost| is invoked. The one exception to this is if the native // OS destroys the widget out from under us, in which case |MenuHostDestroyed| // is invoked back on the SubmenuView and the SubmenuView then drops references // to the MenuHost. -class MenuHost : public Widget, - public internal::NativeMenuHostDelegate { +class MenuHost : public Widget { public: explicit MenuHost(SubmenuView* submenu); virtual ~MenuHost(); @@ -67,13 +64,8 @@ class MenuHost : public Widget, // Overridden from Widget: virtual internal::RootView* CreateRootView() OVERRIDE; virtual bool ShouldReleaseCaptureOnMouseReleased() const OVERRIDE; - - // Overridden from NativeMenuHostDelegate: - virtual void OnNativeMenuHostDestroy() OVERRIDE; - virtual void OnNativeMenuHostCancelCapture() OVERRIDE; - virtual internal::NativeWidgetDelegate* AsNativeWidgetDelegate() OVERRIDE; - - NativeMenuHost* native_menu_host_; + virtual void OnMouseCaptureLost() OVERRIDE; + virtual void OnNativeWidgetDestroyed() OVERRIDE; // The view we contain. SubmenuView* submenu_; @@ -81,6 +73,9 @@ class MenuHost : public Widget, // If true, DestroyMenuHost has been invoked. bool destroying_; + // If true, we're attempting to Show. + bool showing_; + DISALLOW_COPY_AND_ASSIGN(MenuHost); }; |