Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: ui/views/controls/menu/menu_runner.h

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "ui/views/controls/menu/menu_item_view.h" 11 #include "ui/base/ui_base_types.h"
12 #include "ui/views/views_export.h"
13
14 namespace base {
15 class TimeDelta;
16 }
17
18 namespace gfx {
19 class Rect;
20 }
12 21
13 namespace ui { 22 namespace ui {
14 class MenuModel; 23 class MenuModel;
15 } 24 }
16 25
17 namespace views { 26 namespace views {
18 27
19 class MenuButton; 28 class MenuButton;
29 class MenuItemView;
20 class MenuModelAdapter; 30 class MenuModelAdapter;
21 class MenuRunnerHandler; 31 class MenuRunnerHandler;
22 class Widget; 32 class Widget;
23 33
24 namespace internal { 34 namespace internal {
25 class DisplayChangeListener; 35 class DisplayChangeListener;
26 class MenuRunnerImpl; 36 class MenuRunnerImpl;
27 } 37 }
28 38
29 namespace test { 39 namespace test {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 106
97 // Runs the menu. |types| is a bitmask of RunTypes. If this returns 107 // Runs the menu. |types| is a bitmask of RunTypes. If this returns
98 // MENU_DELETED the method is returning because the MenuRunner was deleted. 108 // MENU_DELETED the method is returning because the MenuRunner was deleted.
99 // Typically callers should NOT do any processing if this returns 109 // Typically callers should NOT do any processing if this returns
100 // MENU_DELETED. 110 // MENU_DELETED.
101 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by 111 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by
102 // using |bounds| as the thing to point at in screen coordinates. 112 // using |bounds| as the thing to point at in screen coordinates.
103 RunResult RunMenuAt(Widget* parent, 113 RunResult RunMenuAt(Widget* parent,
104 MenuButton* button, 114 MenuButton* button,
105 const gfx::Rect& bounds, 115 const gfx::Rect& bounds,
106 MenuItemView::AnchorPosition anchor, 116 ui::MenuAnchorPosition anchor,
107 ui::MenuSourceType source_type, 117 ui::MenuSourceType source_type,
108 int32 types) WARN_UNUSED_RESULT; 118 int32 types) WARN_UNUSED_RESULT;
109 119
110 // Returns true if we're in a nested message loop running the menu. 120 // Returns true if we're in a nested message loop running the menu.
111 bool IsRunning() const; 121 bool IsRunning() const;
112 122
113 // Hides and cancels the menu. This does nothing if the menu is not open. 123 // Hides and cancels the menu. This does nothing if the menu is not open.
114 void Cancel(); 124 void Cancel();
115 125
116 // Returns the time from the event which closed the menu - or 0. 126 // Returns the time from the event which closed the menu - or 0.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 161
152 protected: 162 protected:
153 DisplayChangeListener() {} 163 DisplayChangeListener() {}
154 }; 164 };
155 165
156 } 166 }
157 167
158 } // namespace views 168 } // namespace views
159 169
160 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 170 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698