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 |
95 // Get the anchor position wich is used to show this menu. | 99 // Get the anchor position wich is used to show this menu. |
96 MenuAnchorPosition GetAnchorPosition() { return state_.anchor; } | 100 MenuAnchorPosition GetAnchorPosition() { return state_.anchor; } |
97 | 101 |
98 // Cancels the current Run. See ExitType for a description of what happens | 102 // Cancels the current Run. See ExitType for a description of what happens |
99 // with the various parameters. | 103 // with the various parameters. |
100 void Cancel(ExitType type); | 104 void Cancel(ExitType type); |
101 | 105 |
102 // An alternative to Cancel(EXIT_ALL) that can be used with a OneShotTimer. | 106 // An alternative to Cancel(EXIT_ALL) that can be used with a OneShotTimer. |
103 void CancelAll() { Cancel(EXIT_ALL); } | 107 void CancelAll() { Cancel(EXIT_ALL); } |
104 | 108 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 bool item_selected_by_touch_; | 604 bool item_selected_by_touch_; |
601 | 605 |
602 scoped_ptr<MenuMessageLoop> message_loop_; | 606 scoped_ptr<MenuMessageLoop> message_loop_; |
603 | 607 |
604 DISALLOW_COPY_AND_ASSIGN(MenuController); | 608 DISALLOW_COPY_AND_ASSIGN(MenuController); |
605 }; | 609 }; |
606 | 610 |
607 } // namespace views | 611 } // namespace views |
608 | 612 |
609 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 613 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |