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

Unified Diff: chrome/browser/ui/views/download/download_shelf_context_menu_view.cc

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add VIEWS_EXPORT for unit test access 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
Index: chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
diff --git a/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc b/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
index 570f3e3bea9589a89c61a2e10691a1994c36cf57..8065ba7fb9d24d831930b1b045a276e4a6810d48 100644
--- a/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
+++ b/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
@@ -27,7 +27,9 @@ void DownloadShelfContextMenuView::Run(views::Widget* parent_widget,
// Run() should not be getting called if the DownloadItem was destroyed.
DCHECK(menu_model);
- menu_runner_.reset(new views::MenuRunner(menu_model));
+ menu_runner_.reset(new views::MenuRunner(
+ menu_model,
+ views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU));
// The menu's alignment is determined based on the UI layout.
views::MenuAnchorPosition position;
@@ -41,12 +43,7 @@ void DownloadShelfContextMenuView::Run(views::Widget* parent_widget,
// been deleted. We ignore the return value because our caller already assumes
// that the view could be deleted by the time we return from here.
if (menu_runner_->RunMenuAt(
- parent_widget,
- NULL,
- rect,
- position,
- source_type,
- views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
+ parent_widget, NULL, rect, position, source_type) ==
views::MenuRunner::MENU_DELETED) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698