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_ROOT_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_HOST_ROOT_VIEW_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_ROOT_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_ROOT_VIEW_H_ |
7 | 7 |
8 #include "ui/views/widget/root_view.h" | 8 #include "ui/views/widget/root_view.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // Overridden from View: | 27 // Overridden from View: |
28 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 28 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
29 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 29 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
30 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 30 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
31 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; | 31 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
32 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 32 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; |
33 | 33 |
34 private: | 34 private: |
35 // ui::EventProcessor: | 35 // ui::EventProcessor: |
36 virtual ui::EventDispatchDetails OnEventFromSource(ui::Event* event) OVERRIDE; | 36 virtual void OnEventProcessingFinished(ui::Event* event) OVERRIDE; |
37 | 37 |
38 // Returns the MenuController for this MenuHostRootView. | 38 // Returns the MenuController for this MenuHostRootView. |
39 MenuController* GetMenuController(); | 39 MenuController* GetMenuController(); |
40 | 40 |
41 // Returns true if event targets EmptyMenu. | 41 // Returns true if event targets EmptyMenu. |
42 bool DoesEventTargetEmptyMenuItem(const ui::MouseEvent& event); | 42 bool DoesEventTargetEmptyMenuItem(const ui::MouseEvent& event); |
43 | 43 |
44 // The SubmenuView we contain. | 44 // The SubmenuView we contain. |
45 SubmenuView* submenu_; | 45 SubmenuView* submenu_; |
46 | 46 |
47 // Whether mouse dragged/released should be forwarded to the MenuController. | 47 // Whether mouse dragged/released should be forwarded to the MenuController. |
48 bool forward_drag_to_menu_controller_; | 48 bool forward_drag_to_menu_controller_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(MenuHostRootView); | 50 DISALLOW_COPY_AND_ASSIGN(MenuHostRootView); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace views | 53 } // namespace views |
54 | 54 |
55 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_ROOT_VIEW_H_ | 55 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_ROOT_VIEW_H_ |
OLD | NEW |