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

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

Issue 393943006: MacViews: Remove GetMenu() from MenuRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Indicates RunMenuAt returned and MenuRunner was not deleted. 91 // Indicates RunMenuAt returned and MenuRunner was not deleted.
92 NORMAL_EXIT 92 NORMAL_EXIT
93 }; 93 };
94 94
95 // Creates a new MenuRunner. 95 // Creates a new MenuRunner.
96 // |run_types| is a bitmask of RunTypes. 96 // |run_types| is a bitmask of RunTypes.
97 MenuRunner(ui::MenuModel* menu_model, int32 run_types); 97 MenuRunner(ui::MenuModel* menu_model, int32 run_types);
98 MenuRunner(MenuItemView* menu, int32 run_types); 98 MenuRunner(MenuItemView* menu, int32 run_types);
99 ~MenuRunner(); 99 ~MenuRunner();
100 100
101 // Returns the menu.
102 MenuItemView* GetMenu();
103
104 // Takes ownership of |menu|, deleting it when MenuRunner is deleted. You
105 // only need call this if you create additional menus from
106 // MenuDelegate::GetSiblingMenu.
107 void OwnMenu(MenuItemView* menu);
108
109 // Runs the menu. If this returns MENU_DELETED the method is returning 101 // Runs the menu. If this returns MENU_DELETED the method is returning
110 // because the MenuRunner was deleted. 102 // because the MenuRunner was deleted.
111 // Typically callers should NOT do any processing if this returns 103 // Typically callers should NOT do any processing if this returns
112 // MENU_DELETED. 104 // MENU_DELETED.
113 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by 105 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by
114 // using |bounds| as the thing to point at in screen coordinates. 106 // using |bounds| as the thing to point at in screen coordinates.
115 RunResult RunMenuAt(Widget* parent, 107 RunResult RunMenuAt(Widget* parent,
116 MenuButton* button, 108 MenuButton* button,
117 const gfx::Rect& bounds, 109 const gfx::Rect& bounds,
118 MenuAnchorPosition anchor, 110 MenuAnchorPosition anchor,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 155
164 protected: 156 protected:
165 DisplayChangeListener() {} 157 DisplayChangeListener() {}
166 }; 158 };
167 159
168 } // namespace internal 160 } // namespace internal
169 161
170 } // namespace views 162 } // namespace views
171 163
172 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 164 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698