| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 #ifndef VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 6 #ifndef VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
| 7 #define VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 7 #define VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
| 8 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include "views/controls/menu/native_menu_host.h" | 10 #include "views/controls/menu/native_menu_host.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual bool IsMenuHostVisible() OVERRIDE; | 30 virtual bool IsMenuHostVisible() OVERRIDE; |
| 31 virtual void ShowMenuHost(bool do_capture) OVERRIDE; | 31 virtual void ShowMenuHost(bool do_capture) OVERRIDE; |
| 32 virtual void HideMenuHost() OVERRIDE; | 32 virtual void HideMenuHost() OVERRIDE; |
| 33 virtual void DestroyMenuHost() OVERRIDE; | 33 virtual void DestroyMenuHost() OVERRIDE; |
| 34 virtual void SetMenuHostBounds(const gfx::Rect& bounds) OVERRIDE; | 34 virtual void SetMenuHostBounds(const gfx::Rect& bounds) OVERRIDE; |
| 35 virtual void ReleaseMenuHostCapture() OVERRIDE; | 35 virtual void ReleaseMenuHostCapture() OVERRIDE; |
| 36 virtual gfx::NativeWindow GetMenuHostWindow() OVERRIDE; | 36 virtual gfx::NativeWindow GetMenuHostWindow() OVERRIDE; |
| 37 | 37 |
| 38 // Overridden from WidgetGtk: | 38 // Overridden from WidgetGtk: |
| 39 virtual RootView* CreateRootView() OVERRIDE; | 39 virtual RootView* CreateRootView() OVERRIDE; |
| 40 virtual bool ReleaseCaptureOnMouseReleased() OVERRIDE; | 40 virtual bool ShouldReleaseCaptureOnMouseReleased() const OVERRIDE; |
| 41 virtual void ReleaseNativeCapture() OVERRIDE; | 41 virtual void ReleaseMouseCapture() OVERRIDE; |
| 42 virtual void OnDestroy(GtkWidget* object) OVERRIDE; | 42 virtual void OnDestroy(GtkWidget* object) OVERRIDE; |
| 43 virtual void HandleGtkGrabBroke() OVERRIDE; | 43 virtual void HandleGtkGrabBroke() OVERRIDE; |
| 44 virtual void HandleXGrabBroke() OVERRIDE; | 44 virtual void HandleXGrabBroke() OVERRIDE; |
| 45 | 45 |
| 46 void DoCapture(); | 46 void DoCapture(); |
| 47 | 47 |
| 48 // Cancel all menus unless drag is in progress. | 48 // Cancel all menus unless drag is in progress. |
| 49 void CancelAllIfNoDrag(); | 49 void CancelAllIfNoDrag(); |
| 50 | 50 |
| 51 // If true, DestroyMenuHost has been invoked. | 51 // If true, DestroyMenuHost has been invoked. |
| 52 bool destroying_; | 52 bool destroying_; |
| 53 | 53 |
| 54 // The view we contain. | 54 // The view we contain. |
| 55 SubmenuView* submenu_; | 55 SubmenuView* submenu_; |
| 56 | 56 |
| 57 // Have we done input grab? | 57 // Have we done input grab? |
| 58 bool did_input_grab_; | 58 bool did_input_grab_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(MenuHostGtk); | 60 DISALLOW_COPY_AND_ASSIGN(MenuHostGtk); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace views | 63 } // namespace views |
| 64 | 64 |
| 65 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 65 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
| OLD | NEW |