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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 MenuAnchorPosition position, | 85 MenuAnchorPosition position, |
86 bool context_menu, | 86 bool context_menu, |
87 int* event_flags); | 87 int* event_flags); |
88 | 88 |
89 // Whether or not Run blocks. | 89 // Whether or not Run blocks. |
90 bool IsBlockingRun() const { return blocking_run_; } | 90 bool IsBlockingRun() const { return blocking_run_; } |
91 | 91 |
92 // Whether or not drag operation is in progress. | 92 // Whether or not drag operation is in progress. |
93 bool drag_in_progress() const { return drag_in_progress_; } | 93 bool drag_in_progress() const { return drag_in_progress_; } |
94 | 94 |
95 // Returns the owner of child windows. | |
96 // WARNING: this may be NULL. | |
97 Widget* owner() { return owner_; } | |
98 | |
99 // Get the anchor position wich is used to show this menu. | 95 // Get the anchor position wich is used to show this menu. |
100 MenuAnchorPosition GetAnchorPosition() { return state_.anchor; } | 96 MenuAnchorPosition GetAnchorPosition() { return state_.anchor; } |
101 | 97 |
102 // Cancels the current Run. See ExitType for a description of what happens | 98 // Cancels the current Run. See ExitType for a description of what happens |
103 // with the various parameters. | 99 // with the various parameters. |
104 void Cancel(ExitType type); | 100 void Cancel(ExitType type); |
105 | 101 |
106 // An alternative to Cancel(EXIT_ALL) that can be used with a OneShotTimer. | 102 // An alternative to Cancel(EXIT_ALL) that can be used with a OneShotTimer. |
107 void CancelAll() { Cancel(EXIT_ALL); } | 103 void CancelAll() { Cancel(EXIT_ALL); } |
108 | 104 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 bool item_selected_by_touch_; | 600 bool item_selected_by_touch_; |
605 | 601 |
606 scoped_ptr<MenuMessageLoop> message_loop_; | 602 scoped_ptr<MenuMessageLoop> message_loop_; |
607 | 603 |
608 DISALLOW_COPY_AND_ASSIGN(MenuController); | 604 DISALLOW_COPY_AND_ASSIGN(MenuController); |
609 }; | 605 }; |
610 | 606 |
611 } // namespace views | 607 } // namespace views |
612 | 608 |
613 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 609 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |