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

Unified Diff: chrome/browser/ui/views/location_bar/page_action_image_view.cc

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 6 years, 8 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 fc77014685a67aa2bfc0773a6adb00b6380f930e..cfb05e3234e705038106c228237756533f68338a 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
@@ -26,7 +26,6 @@
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
-#include "ui/views/controls/menu/menu_item_view.h"
#include "ui/views/controls/menu/menu_runner.h"
using content::WebContents;
@@ -160,11 +159,16 @@ void PageActionImageView::ShowContextMenuForView(
menu_runner_.reset(new views::MenuRunner(context_menu_model.get()));
gfx::Point screen_loc;
views::View::ConvertPointToScreen(this, &screen_loc);
- if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(screen_loc, size()),
- views::MenuItemView::TOPLEFT, source_type,
+ if (menu_runner_->RunMenuAt(
+ GetWidget(),
+ NULL,
+ gfx::Rect(screen_loc, size()),
+ views::MENU_ANCHOR_TOPLEFT,
+ source_type,
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
- views::MenuRunner::MENU_DELETED)
+ views::MenuRunner::MENU_DELETED) {
return;
+ }
}
bool PageActionImageView::AcceleratorPressed(
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/menu_model_adapter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698