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

Unified Diff: ui/app_list/views/app_list_item_view.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 6 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/app_list/views/app_list_item_view.h ('k') | ui/app_list/views/app_list_menu_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_item_view.cc
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index c397fb0edc3d44b13e3f46413f84a379ca6e046b..fa2b1237bb143f3ac45a44f12a5386a3eb958e8c 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -271,7 +271,8 @@ void AppListItemView::GetAccessibleState(ui::AccessibleViewState* state) {
}
void AppListItemView::ShowContextMenuForView(views::View* source,
- const gfx::Point& point) {
+ const gfx::Point& point,
+ ui::MenuSourceType source_type) {
ui::MenuModel* menu_model = model_->GetContextMenuModel();
if (!menu_model)
return;
@@ -279,7 +280,8 @@ void AppListItemView::ShowContextMenuForView(views::View* source,
context_menu_runner_.reset(new views::MenuRunner(menu_model));
if (context_menu_runner_->RunMenuAt(
GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
- views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS) ==
+ views::MenuItemView::TOPLEFT, source_type,
+ views::MenuRunner::HAS_MNEMONICS) ==
views::MenuRunner::MENU_DELETED)
return;
}
« no previous file with comments | « ui/app_list/views/app_list_item_view.h ('k') | ui/app_list/views/app_list_menu_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698