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_CONTROLLER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Various events, forwarded from the submenu. | 108 // Various events, forwarded from the submenu. |
109 // | 109 // |
110 // NOTE: the coordinates of the events are in that of the | 110 // NOTE: the coordinates of the events are in that of the |
111 // MenuScrollViewContainer. | 111 // MenuScrollViewContainer. |
112 void OnMousePressed(SubmenuView* source, const ui::MouseEvent& event); | 112 void OnMousePressed(SubmenuView* source, const ui::MouseEvent& event); |
113 void OnMouseDragged(SubmenuView* source, const ui::MouseEvent& event); | 113 void OnMouseDragged(SubmenuView* source, const ui::MouseEvent& event); |
114 void OnMouseReleased(SubmenuView* source, const ui::MouseEvent& event); | 114 void OnMouseReleased(SubmenuView* source, const ui::MouseEvent& event); |
115 void OnMouseMoved(SubmenuView* source, const ui::MouseEvent& event); | 115 void OnMouseMoved(SubmenuView* source, const ui::MouseEvent& event); |
116 void OnMouseEntered(SubmenuView* source, const ui::MouseEvent& event); | 116 void OnMouseEntered(SubmenuView* source, const ui::MouseEvent& event); |
117 #if defined(OS_LINUX) | 117 #if defined(OS_LINUX) |
118 bool OnMouseWheel(SubmenuView* source, const MouseWheelEvent& event); | 118 bool OnMouseWheel(SubmenuView* source, const ui::MouseWheelEvent& event); |
119 #endif | 119 #endif |
120 ui::GestureStatus OnGestureEvent(SubmenuView* source, | 120 ui::GestureStatus OnGestureEvent(SubmenuView* source, |
121 const GestureEvent& event); | 121 const ui::GestureEvent& event); |
122 | 122 |
123 bool GetDropFormats( | 123 bool GetDropFormats( |
124 SubmenuView* source, | 124 SubmenuView* source, |
125 int* formats, | 125 int* formats, |
126 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); | 126 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); |
127 bool AreDropTypesRequired(SubmenuView* source); | 127 bool AreDropTypesRequired(SubmenuView* source); |
128 bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data); | 128 bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data); |
129 void OnDragEntered(SubmenuView* source, const DropTargetEvent& event); | 129 void OnDragEntered(SubmenuView* source, const ui::DropTargetEvent& event); |
130 int OnDragUpdated(SubmenuView* source, const DropTargetEvent& event); | 130 int OnDragUpdated(SubmenuView* source, const ui::DropTargetEvent& event); |
131 void OnDragExited(SubmenuView* source); | 131 void OnDragExited(SubmenuView* source); |
132 int OnPerformDrop(SubmenuView* source, const DropTargetEvent& event); | 132 int OnPerformDrop(SubmenuView* source, const ui::DropTargetEvent& event); |
133 | 133 |
134 // Invoked from the scroll buttons of the MenuScrollViewContainer. | 134 // Invoked from the scroll buttons of the MenuScrollViewContainer. |
135 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); | 135 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); |
136 void OnDragExitedScrollButton(SubmenuView* source); | 136 void OnDragExitedScrollButton(SubmenuView* source); |
137 | 137 |
138 // Update the submenu's selection based on the current mouse location | 138 // Update the submenu's selection based on the current mouse location |
139 void UpdateSubmenuSelection(SubmenuView* source); | 139 void UpdateSubmenuSelection(SubmenuView* source); |
140 | 140 |
141 private: | 141 private: |
142 friend class internal::MenuRunnerImpl; | 142 friend class internal::MenuRunnerImpl; |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // How deep we are in nested message loops. This should be at most 2 (when | 556 // How deep we are in nested message loops. This should be at most 2 (when |
557 // showing a context menu from a menu). | 557 // showing a context menu from a menu). |
558 int message_loop_depth_; | 558 int message_loop_depth_; |
559 | 559 |
560 DISALLOW_COPY_AND_ASSIGN(MenuController); | 560 DISALLOW_COPY_AND_ASSIGN(MenuController); |
561 }; | 561 }; |
562 | 562 |
563 } // namespace views | 563 } // namespace views |
564 | 564 |
565 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 565 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |