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

Unified Diff: ui/views/controls/menu/menu_runner.h

Issue 390183002: MacViews: Move menu run types parameter to constructor. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_model_adapter_unittest.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_runner.h
diff --git a/ui/views/controls/menu/menu_runner.h b/ui/views/controls/menu/menu_runner.h
index 824afdf8d4b52a37c7a37eb4bc8f36d67ebd8aa4..a96bfb2ee42f06738fde3b5536bf3b4282667f3a 100644
--- a/ui/views/controls/menu/menu_runner.h
+++ b/ui/views/controls/menu/menu_runner.h
@@ -93,8 +93,9 @@ class VIEWS_EXPORT MenuRunner {
};
// Creates a new MenuRunner.
- explicit MenuRunner(ui::MenuModel* menu_model);
- explicit MenuRunner(MenuItemView* menu);
+ // |run_types| is a bitmask of RunTypes.
+ MenuRunner(ui::MenuModel* menu_model, int32 run_types);
+ MenuRunner(MenuItemView* menu, int32 run_types);
~MenuRunner();
// Returns the menu.
@@ -105,8 +106,8 @@ class VIEWS_EXPORT MenuRunner {
// MenuDelegate::GetSiblingMenu.
void OwnMenu(MenuItemView* menu);
- // Runs the menu. |types| is a bitmask of RunTypes. If this returns
- // MENU_DELETED the method is returning because the MenuRunner was deleted.
+ // Runs the menu. If this returns MENU_DELETED the method is returning
+ // because the MenuRunner was deleted.
// Typically callers should NOT do any processing if this returns
// MENU_DELETED.
// If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by
@@ -115,8 +116,7 @@ class VIEWS_EXPORT MenuRunner {
MenuButton* button,
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
- ui::MenuSourceType source_type,
- int32 types) WARN_UNUSED_RESULT;
+ ui::MenuSourceType source_type) WARN_UNUSED_RESULT;
// Returns true if we're in a nested message loop running the menu.
bool IsRunning() const;
@@ -133,6 +133,7 @@ class VIEWS_EXPORT MenuRunner {
// Sets an implementation of RunMenuAt. This is intended to be used at test.
void SetRunnerHandler(scoped_ptr<MenuRunnerHandler> runner_handler);
+ const int32 run_types_;
scoped_ptr<MenuModelAdapter> menu_model_adapter_;
internal::MenuRunnerImpl* holder_;
@@ -164,7 +165,7 @@ class DisplayChangeListener {
DisplayChangeListener() {}
};
-}
+} // namespace internal
} // namespace views
« no previous file with comments | « ui/views/controls/menu/menu_model_adapter_unittest.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698