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

Unified Diff: ui/views/examples/menu_example.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
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/menu_example.cc
diff --git a/ui/views/examples/menu_example.cc b/ui/views/examples/menu_example.cc
index bd9ea486786dbaec2793a08f45b89c5a8d874add..742cfffa4b207f61ea45e52c825b79b0c7f80d40 100644
--- a/ui/views/examples/menu_example.cc
+++ b/ui/views/examples/menu_example.cc
@@ -189,11 +189,15 @@ void ExampleMenuButton::OnMenuButtonClicked(View* source,
const gfx::Point& point) {
menu_runner_.reset(new MenuRunner(GetMenuModel()));
- if (menu_runner_->RunMenuAt(source->GetWidget()->GetTopLevelWidget(), this,
- gfx::Rect(point, gfx::Size()), MenuItemView::TOPRIGHT,
- ui::MENU_SOURCE_NONE, MenuRunner::HAS_MNEMONICS) ==
- MenuRunner::MENU_DELETED)
+ if (menu_runner_->RunMenuAt(source->GetWidget()->GetTopLevelWidget(),
+ this,
+ gfx::Rect(point, gfx::Size()),
+ MENU_ANCHOR_TOPRIGHT,
+ ui::MENU_SOURCE_NONE,
+ MenuRunner::HAS_MNEMONICS) ==
+ MenuRunner::MENU_DELETED) {
return;
+ }
}
ui::SimpleMenuModel* ExampleMenuButton::GetMenuModel() {
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698