Chromium Code Reviews| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // Typically callers should NOT do any processing if this returns | 90 // Typically callers should NOT do any processing if this returns |
| 91 // MENU_DELETED. | 91 // MENU_DELETED. |
| 92 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by | 92 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by |
| 93 // using |bounds| as the thing to point at in screen coordinates. | 93 // using |bounds| as the thing to point at in screen coordinates. |
| 94 RunResult RunMenuAt(Widget* parent, | 94 RunResult RunMenuAt(Widget* parent, |
| 95 MenuButton* button, | 95 MenuButton* button, |
| 96 const gfx::Rect& bounds, | 96 const gfx::Rect& bounds, |
| 97 MenuItemView::AnchorPosition anchor, | 97 MenuItemView::AnchorPosition anchor, |
| 98 int32 types) WARN_UNUSED_RESULT; | 98 int32 types) WARN_UNUSED_RESULT; |
| 99 | 99 |
| 100 RunResult RunContextMenuAt(Widget* parent, | |
|
sky
2013/06/13 19:54:53
We already have RunTypes::CONTEXT_MENU, so we don'
varunjain
2013/06/13 20:26:43
The requirement here is to identify, 1) if its a c
| |
| 101 MenuButton* button, | |
| 102 const gfx::Rect& bounds, | |
| 103 ui::ContextMenuSourceType source, | |
| 104 int32 types) WARN_UNUSED_RESULT; | |
| 105 | |
| 100 // Returns true if we're in a nested message loop running the menu. | 106 // Returns true if we're in a nested message loop running the menu. |
| 101 bool IsRunning() const; | 107 bool IsRunning() const; |
| 102 | 108 |
| 103 // Hides and cancels the menu. This does nothing if the menu is not open. | 109 // Hides and cancels the menu. This does nothing if the menu is not open. |
| 104 void Cancel(); | 110 void Cancel(); |
| 105 | 111 |
| 106 // Returns the time from the event which closed the menu - or 0. | 112 // Returns the time from the event which closed the menu - or 0. |
| 107 base::TimeDelta closing_event_time() const; | 113 base::TimeDelta closing_event_time() const; |
| 108 | 114 |
| 109 private: | 115 private: |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 132 | 138 |
| 133 protected: | 139 protected: |
| 134 DisplayChangeListener() {} | 140 DisplayChangeListener() {} |
| 135 }; | 141 }; |
| 136 | 142 |
| 137 } | 143 } |
| 138 | 144 |
| 139 } // namespace views | 145 } // namespace views |
| 140 | 146 |
| 141 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ | 147 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ |
| OLD | NEW |