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/menu_host.h" | 10 #include "views/controls/menu/menu_host.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 virtual void HideMenuHost() OVERRIDE; | 30 virtual void HideMenuHost() OVERRIDE; |
31 virtual void DestroyMenuHost() OVERRIDE; | 31 virtual void DestroyMenuHost() OVERRIDE; |
32 virtual void SetMenuHostBounds(const gfx::Rect& bounds) OVERRIDE; | 32 virtual void SetMenuHostBounds(const gfx::Rect& bounds) OVERRIDE; |
33 virtual void ReleaseMenuHostCapture() OVERRIDE; | 33 virtual void ReleaseMenuHostCapture() OVERRIDE; |
34 virtual gfx::NativeWindow GetMenuHostWindow() OVERRIDE; | 34 virtual gfx::NativeWindow GetMenuHostWindow() OVERRIDE; |
35 | 35 |
36 protected: | 36 protected: |
37 virtual RootView* CreateRootView() OVERRIDE; | 37 virtual RootView* CreateRootView() OVERRIDE; |
38 | 38 |
39 // WidgetGtk overrides: | 39 // WidgetGtk overrides: |
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 private: | 46 private: |
47 void DoCapture(); | 47 void DoCapture(); |
48 | 48 |
49 // Cancell all menus unless drag is in progress. | 49 // Cancell all menus unless drag is in progress. |
50 void CancelAllIfNoDrag(); | 50 void CancelAllIfNoDrag(); |
51 | 51 |
52 // If true, DestroyMenuHost has been invoked. | 52 // If true, DestroyMenuHost has been invoked. |
53 bool destroying_; | 53 bool destroying_; |
54 | 54 |
55 // The view we contain. | 55 // The view we contain. |
56 SubmenuView* submenu_; | 56 SubmenuView* submenu_; |
57 | 57 |
58 // Have we done input grab? | 58 // Have we done input grab? |
59 bool did_input_grab_; | 59 bool did_input_grab_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(MenuHostGtk); | 61 DISALLOW_COPY_AND_ASSIGN(MenuHostGtk); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace views | 64 } // namespace views |
65 | 65 |
66 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 66 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
OLD | NEW |