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_RUNNER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Runs the menu. If this returns MENU_DELETED the method is returning | 113 // Runs the menu. If this returns MENU_DELETED the method is returning |
114 // because the MenuRunner was deleted. | 114 // because the MenuRunner was deleted. |
115 // Typically callers should NOT do any processing if this returns | 115 // Typically callers should NOT do any processing if this returns |
116 // MENU_DELETED. | 116 // MENU_DELETED. |
117 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by | 117 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by |
118 // using |bounds| as the thing to point at in screen coordinates. | 118 // using |bounds| as the thing to point at in screen coordinates. |
119 RunResult RunMenuAt(Widget* parent, | 119 RunResult RunMenuAt(Widget* parent, |
120 MenuButton* button, | 120 MenuButton* button, |
121 const gfx::Rect& bounds, | 121 const gfx::Rect& bounds, |
122 MenuAnchorPosition anchor, | 122 MenuAnchorPosition anchor, |
123 ui::MenuSourceType source_type) WARN_UNUSED_RESULT; | 123 ui::MenuSourceType source_type); |
124 | 124 |
125 // Returns true if we're in a nested message loop running the menu. | 125 // Returns true if we're in a nested message loop running the menu. |
126 bool IsRunning() const; | 126 bool IsRunning() const; |
127 | 127 |
128 // Hides and cancels the menu. This does nothing if the menu is not open. | 128 // Hides and cancels the menu. This does nothing if the menu is not open. |
129 void Cancel(); | 129 void Cancel(); |
130 | 130 |
131 // Returns the time from the event which closed the menu - or 0. | 131 // Returns the time from the event which closed the menu - or 0. |
132 base::TimeDelta closing_event_time() const; | 132 base::TimeDelta closing_event_time() const; |
133 | 133 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 protected: | 168 protected: |
169 DisplayChangeListener() {} | 169 DisplayChangeListener() {} |
170 }; | 170 }; |
171 | 171 |
172 } // namespace internal | 172 } // namespace internal |
173 | 173 |
174 } // namespace views | 174 } // namespace views |
175 | 175 |
176 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ | 176 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ |
OLD | NEW |