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

Unified Diff: chrome/browser/ui/views/location_bar/page_action_image_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
Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index cad5c54a62730649ebc138585beeb4b466057f63..ddb69b97ff8beabeefbd6d0383f7834ff49ff2eb 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -175,8 +175,10 @@ bool PageActionImageView::OnKeyPressed(const ui::KeyEvent& event) {
return false;
}
-void PageActionImageView::ShowContextMenuForView(View* source,
- const gfx::Point& point) {
+void PageActionImageView::ShowContextMenuForView(
+ View* source,
+ const gfx::Point& point,
+ ui::MenuSourceType source_type) {
const Extension* extension = owner_->profile()->GetExtensionService()->
GetExtensionById(page_action()->extension_id(), false);
if (!extension->ShowConfigureContextMenus())
@@ -188,8 +190,8 @@ void PageActionImageView::ShowContextMenuForView(View* source,
gfx::Point screen_loc;
views::View::ConvertPointToScreen(this, &screen_loc);
if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(screen_loc, size()),
- views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS |
- views::MenuRunner::CONTEXT_MENU) ==
+ views::MenuItemView::TOPLEFT, source_type,
+ views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
views::MenuRunner::MENU_DELETED)
return;
}
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.h ('k') | chrome/browser/ui/views/menu_item_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698