| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 namespace internal { | 47 namespace internal { |
| 48 class MenuControllerDelegate; | 48 class MenuControllerDelegate; |
| 49 class MenuEventDispatcher; | 49 class MenuEventDispatcher; |
| 50 class MenuMessagePumpDispatcher; | 50 class MenuMessagePumpDispatcher; |
| 51 class MenuRunnerImpl; | 51 class MenuRunnerImpl; |
| 52 } | 52 } |
| 53 | 53 |
| 54 namespace test { | 54 namespace test { |
| 55 class MenuControllerTest; | 55 class MenuControllerTest; |
| 56 class MenuControllerTestDeleter; |
| 56 } | 57 } |
| 57 | 58 |
| 58 // MenuController ------------------------------------------------------------- | 59 // MenuController ------------------------------------------------------------- |
| 59 | 60 |
| 60 // MenuController is used internally by the various menu classes to manage | 61 // MenuController is used internally by the various menu classes to manage |
| 61 // showing, selecting and drag/drop for menus. All relevant events are | 62 // showing, selecting and drag/drop for menus. All relevant events are |
| 62 // forwarded to the MenuController from SubmenuView and MenuHost. | 63 // forwarded to the MenuController from SubmenuView and MenuHost. |
| 63 class VIEWS_EXPORT MenuController : public WidgetObserver { | 64 class VIEWS_EXPORT MenuController : public WidgetObserver { |
| 64 public: | 65 public: |
| 65 // Enumeration of how the menu should exit. | 66 // Enumeration of how the menu should exit. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 bool IsCancelAllTimerRunningForTest(); | 182 bool IsCancelAllTimerRunningForTest(); |
| 182 | 183 |
| 183 // Only used for testing. | 184 // Only used for testing. |
| 184 static void TurnOffMenuSelectionHoldForTest(); | 185 static void TurnOffMenuSelectionHoldForTest(); |
| 185 | 186 |
| 186 private: | 187 private: |
| 187 friend class internal::MenuEventDispatcher; | 188 friend class internal::MenuEventDispatcher; |
| 188 friend class internal::MenuMessagePumpDispatcher; | 189 friend class internal::MenuMessagePumpDispatcher; |
| 189 friend class internal::MenuRunnerImpl; | 190 friend class internal::MenuRunnerImpl; |
| 190 friend class test::MenuControllerTest; | 191 friend class test::MenuControllerTest; |
| 192 friend class test::MenuControllerTestDeleter; |
| 193 friend class MenuEventFilter; |
| 191 friend class MenuHostRootView; | 194 friend class MenuHostRootView; |
| 192 friend class MenuItemView; | 195 friend class MenuItemView; |
| 193 friend class SubmenuView; | 196 friend class SubmenuView; |
| 194 | 197 |
| 195 class MenuScrollTask; | 198 class MenuScrollTask; |
| 196 | 199 |
| 197 struct SelectByCharDetails; | 200 struct SelectByCharDetails; |
| 198 | 201 |
| 199 // Values supplied to SetSelection. | 202 // Values supplied to SetSelection. |
| 200 enum SetSelectionTypes { | 203 enum SetSelectionTypes { |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 bool item_selected_by_touch_; | 645 bool item_selected_by_touch_; |
| 643 | 646 |
| 644 scoped_ptr<MenuMessageLoop> message_loop_; | 647 scoped_ptr<MenuMessageLoop> message_loop_; |
| 645 | 648 |
| 646 DISALLOW_COPY_AND_ASSIGN(MenuController); | 649 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 647 }; | 650 }; |
| 648 | 651 |
| 649 } // namespace views | 652 } // namespace views |
| 650 | 653 |
| 651 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 654 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |