| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Called by the Widget when a drag is about to start on a child view. This | 169 // Called by the Widget when a drag is about to start on a child view. This |
| 170 // could be initiated by one of our MenuItemViews, or could be through another | 170 // could be initiated by one of our MenuItemViews, or could be through another |
| 171 // child View. | 171 // child View. |
| 172 void OnDragWillStart(); | 172 void OnDragWillStart(); |
| 173 | 173 |
| 174 // Called by the Widget when the drag has completed. |should_close| | 174 // Called by the Widget when the drag has completed. |should_close| |
| 175 // corresponds to whether or not the menu should close. | 175 // corresponds to whether or not the menu should close. |
| 176 void OnDragComplete(bool should_close); | 176 void OnDragComplete(bool should_close); |
| 177 | 177 |
| 178 // Called while dispatching messages to intercept key events. | 178 // Called while dispatching messages to intercept key events. |
| 179 // If |character| is other than 0, it is handled as a mnemonic. | 179 // If |event| is a character event, it is handled as a mnemonic. |
| 180 // Otherwise, |key_code| is handled as a menu navigation command. | 180 // Otherwise, it is handled as a menu navigation command. |
| 181 // Returns ui::POST_DISPATCH_NONE if the event was swallowed by the menu. | 181 // Returns ui::POST_DISPATCH_NONE if the event was swallowed by the menu. |
| 182 ui::PostDispatchAction OnWillDispatchKeyEvent(base::char16 character, | 182 ui::PostDispatchAction OnWillDispatchKeyEvent(const ui::KeyEvent& event); |
| 183 ui::KeyboardCode key_code); | |
| 184 | 183 |
| 185 // Update the submenu's selection based on the current mouse location | 184 // Update the submenu's selection based on the current mouse location |
| 186 void UpdateSubmenuSelection(SubmenuView* source); | 185 void UpdateSubmenuSelection(SubmenuView* source); |
| 187 | 186 |
| 188 // WidgetObserver overrides: | 187 // WidgetObserver overrides: |
| 189 void OnWidgetDestroying(Widget* widget) override; | 188 void OnWidgetDestroying(Widget* widget) override; |
| 190 | 189 |
| 191 // Only used for testing. | 190 // Only used for testing. |
| 192 bool IsCancelAllTimerRunningForTest(); | 191 bool IsCancelAllTimerRunningForTest(); |
| 193 | 192 |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 #if defined(USE_AURA) | 704 #if defined(USE_AURA) |
| 706 std::unique_ptr<MenuKeyEventHandler> key_event_handler_; | 705 std::unique_ptr<MenuKeyEventHandler> key_event_handler_; |
| 707 #endif | 706 #endif |
| 708 | 707 |
| 709 DISALLOW_COPY_AND_ASSIGN(MenuController); | 708 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 710 }; | 709 }; |
| 711 | 710 |
| 712 } // namespace views | 711 } // namespace views |
| 713 | 712 |
| 714 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 713 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |