OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Sets the bounds of the menu host. | 51 // Sets the bounds of the menu host. |
52 void SetMenuHostBounds(const gfx::Rect& bounds); | 52 void SetMenuHostBounds(const gfx::Rect& bounds); |
53 | 53 |
54 // Releases a mouse grab installed by |ShowMenuHost|. | 54 // Releases a mouse grab installed by |ShowMenuHost|. |
55 void ReleaseMenuHostCapture(); | 55 void ReleaseMenuHostCapture(); |
56 | 56 |
57 private: | 57 private: |
58 // Overridden from Widget: | 58 // Overridden from Widget: |
59 virtual internal::RootView* CreateRootView() OVERRIDE; | 59 virtual internal::RootView* CreateRootView() OVERRIDE; |
60 virtual bool ShouldReleaseCaptureOnMouseReleased() const OVERRIDE; | |
61 virtual void OnMouseCaptureLost() OVERRIDE; | 60 virtual void OnMouseCaptureLost() OVERRIDE; |
62 virtual void OnNativeWidgetDestroyed() OVERRIDE; | 61 virtual void OnNativeWidgetDestroyed() OVERRIDE; |
63 virtual void OnOwnerClosing() OVERRIDE; | 62 virtual void OnOwnerClosing() OVERRIDE; |
64 | 63 |
65 // The view we contain. | 64 // The view we contain. |
66 SubmenuView* submenu_; | 65 SubmenuView* submenu_; |
67 | 66 |
68 // If true, DestroyMenuHost has been invoked. | 67 // If true, DestroyMenuHost has been invoked. |
69 bool destroying_; | 68 bool destroying_; |
70 | 69 |
71 // If true and capture is lost we don't notify the delegate. | 70 // If true and capture is lost we don't notify the delegate. |
72 bool ignore_capture_lost_; | 71 bool ignore_capture_lost_; |
73 | 72 |
74 DISALLOW_COPY_AND_ASSIGN(MenuHost); | 73 DISALLOW_COPY_AND_ASSIGN(MenuHost); |
75 }; | 74 }; |
76 | 75 |
77 } // namespace views | 76 } // namespace views |
78 | 77 |
79 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ | 78 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
OLD | NEW |