| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Invoked from the scroll buttons of the MenuScrollViewContainer. | 129 // Invoked from the scroll buttons of the MenuScrollViewContainer. |
| 130 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); | 130 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); |
| 131 void OnDragExitedScrollButton(SubmenuView* source); | 131 void OnDragExitedScrollButton(SubmenuView* source); |
| 132 | 132 |
| 133 // Update the submenu's selection based on the current mouse location | 133 // Update the submenu's selection based on the current mouse location |
| 134 void UpdateSubmenuSelection(SubmenuView* source); | 134 void UpdateSubmenuSelection(SubmenuView* source); |
| 135 | 135 |
| 136 // WidgetObserver overrides: | 136 // WidgetObserver overrides: |
| 137 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; | 137 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; |
| 138 | 138 |
| 139 // Only used for testing. |
| 140 static void TurnOffContextMenuSelectionHoldForTest(); |
| 141 |
| 139 private: | 142 private: |
| 140 friend class internal::MenuRunnerImpl; | 143 friend class internal::MenuRunnerImpl; |
| 141 friend class MenuHostRootView; | 144 friend class MenuHostRootView; |
| 142 friend class MenuItemView; | 145 friend class MenuItemView; |
| 143 friend class SubmenuView; | 146 friend class SubmenuView; |
| 144 | 147 |
| 145 class MenuScrollTask; | 148 class MenuScrollTask; |
| 146 | 149 |
| 147 struct SelectByCharDetails; | 150 struct SelectByCharDetails; |
| 148 | 151 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 563 |
| 561 // How deep we are in nested message loops. This should be at most 2 (when | 564 // How deep we are in nested message loops. This should be at most 2 (when |
| 562 // showing a context menu from a menu). | 565 // showing a context menu from a menu). |
| 563 int message_loop_depth_; | 566 int message_loop_depth_; |
| 564 | 567 |
| 565 views::MenuConfig menu_config_; | 568 views::MenuConfig menu_config_; |
| 566 | 569 |
| 567 // The timestamp of the event which closed the menu - or 0 otherwise. | 570 // The timestamp of the event which closed the menu - or 0 otherwise. |
| 568 base::TimeDelta closing_event_time_; | 571 base::TimeDelta closing_event_time_; |
| 569 | 572 |
| 573 // Time when the menu is first shown. |
| 574 base::TimeTicks menu_start_time_; |
| 575 |
| 570 DISALLOW_COPY_AND_ASSIGN(MenuController); | 576 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 571 }; | 577 }; |
| 572 | 578 |
| 573 } // namespace views | 579 } // namespace views |
| 574 | 580 |
| 575 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 581 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |