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

Unified Diff: ui/views/examples/tree_view_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/examples/menu_example.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/tree_view_example.cc
diff --git a/ui/views/examples/tree_view_example.cc b/ui/views/examples/tree_view_example.cc
index e7cce32d0adfa2e76b0847591010c00cbca43325..2f6cc4cedf3a3126f7914164ab0c7f9115a5967c 100644
--- a/ui/views/examples/tree_view_example.cc
+++ b/ui/views/examples/tree_view_example.cc
@@ -132,10 +132,14 @@ void TreeViewExample::ShowContextMenuForView(View* source,
context_menu_model.AddItem(ID_REMOVE, ASCIIToUTF16("Remove"));
context_menu_model.AddItem(ID_ADD, ASCIIToUTF16("Add"));
context_menu_runner_.reset(new MenuRunner(&context_menu_model));
- if (context_menu_runner_->RunMenuAt(source->GetWidget(), NULL,
- gfx::Rect(point, gfx::Size()), MenuItemView::TOPLEFT, source_type, 0) ==
- MenuRunner::MENU_DELETED)
+ if (context_menu_runner_->RunMenuAt(source->GetWidget(),
+ NULL,
+ gfx::Rect(point, gfx::Size()),
+ MENU_ANCHOR_TOPLEFT,
+ source_type,
+ 0) == MenuRunner::MENU_DELETED) {
return;
+ }
}
bool TreeViewExample::IsCommandIdChecked(int command_id) const {
« no previous file with comments | « ui/views/examples/menu_example.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698