| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Sets whether the subsequent call to Run is asynchronous. When nesting calls | 125 // Sets whether the subsequent call to Run is asynchronous. When nesting calls |
| 126 // to Run, if a new MenuControllerDelegate has been nested, the previous | 126 // to Run, if a new MenuControllerDelegate has been nested, the previous |
| 127 // asynchronous state will be reapplied once nesting has ended. | 127 // asynchronous state will be reapplied once nesting has ended. |
| 128 void SetAsyncRun(bool is_async); | 128 void SetAsyncRun(bool is_async); |
| 129 | 129 |
| 130 // Returns the current exit type. This returns a value other than EXIT_NONE if | 130 // Returns the current exit type. This returns a value other than EXIT_NONE if |
| 131 // the menu is being canceled. | 131 // the menu is being canceled. |
| 132 ExitType exit_type() const { return exit_type_; } | 132 ExitType exit_type() const { return exit_type_; } |
| 133 | 133 |
| 134 // Returns the time from the event which closed the menu - or 0. | 134 // Returns the time from the event which closed the menu - or 0. |
| 135 // TODO(majidvp): Should return a TimeTicks. crbug.com/453559 |
| 135 base::TimeDelta closing_event_time() const { return closing_event_time_; } | 136 base::TimeDelta closing_event_time() const { return closing_event_time_; } |
| 136 | 137 |
| 137 void set_is_combobox(bool is_combobox) { is_combobox_ = is_combobox; } | 138 void set_is_combobox(bool is_combobox) { is_combobox_ = is_combobox; } |
| 138 | 139 |
| 139 // Various events, forwarded from the submenu. | 140 // Various events, forwarded from the submenu. |
| 140 // | 141 // |
| 141 // NOTE: the coordinates of the events are in that of the | 142 // NOTE: the coordinates of the events are in that of the |
| 142 // MenuScrollViewContainer. | 143 // MenuScrollViewContainer. |
| 143 bool OnMousePressed(SubmenuView* source, const ui::MouseEvent& event); | 144 bool OnMousePressed(SubmenuView* source, const ui::MouseEvent& event); |
| 144 bool OnMouseDragged(SubmenuView* source, const ui::MouseEvent& event); | 145 bool OnMouseDragged(SubmenuView* source, const ui::MouseEvent& event); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 #if defined(USE_AURA) | 706 #if defined(USE_AURA) |
| 706 std::unique_ptr<MenuKeyEventHandler> key_event_handler_; | 707 std::unique_ptr<MenuKeyEventHandler> key_event_handler_; |
| 707 #endif | 708 #endif |
| 708 | 709 |
| 709 DISALLOW_COPY_AND_ASSIGN(MenuController); | 710 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 710 }; | 711 }; |
| 711 | 712 |
| 712 } // namespace views | 713 } // namespace views |
| 713 | 714 |
| 714 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 715 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |