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

Unified Diff: ash/shelf/shelf_view.cc

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 | « ash/root_window_controller.cc ('k') | ash/shell/window_type_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 972afa759449a8b783c2a1420a1f1416d414c14e..cc0e1ae2836b73231bfd9e9bfa8663fd878f1089 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -1764,7 +1764,8 @@ void ShelfView::ShowMenu(ui::MenuModel* menu_model,
bool context_menu,
ui::MenuSourceType source_type) {
closing_event_time_ = base::TimeDelta();
- launcher_menu_runner_.reset(new views::MenuRunner(menu_model));
+ launcher_menu_runner_.reset(new views::MenuRunner(
+ menu_model, context_menu ? views::MenuRunner::CONTEXT_MENU : 0));
ScopedTargetRootWindow scoped_target(
source->GetWidget()->GetNativeView()->GetRootWindow());
@@ -1816,13 +1817,11 @@ void ShelfView::ShowMenu(ui::MenuModel* menu_model,
shelf->ForceUndimming(true);
// NOTE: if you convert to HAS_MNEMONICS be sure and update menu building
// code.
- if (launcher_menu_runner_->RunMenuAt(
- source->GetWidget(),
- NULL,
- anchor_point,
- menu_alignment,
- source_type,
- context_menu ? views::MenuRunner::CONTEXT_MENU : 0) ==
+ if (launcher_menu_runner_->RunMenuAt(source->GetWidget(),
+ NULL,
+ anchor_point,
+ menu_alignment,
+ source_type) ==
views::MenuRunner::MENU_DELETED) {
if (!got_deleted) {
got_deleted_ = NULL;
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shell/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698