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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 390183002: MacViews: Move menu run types parameter to constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/scrollbar/base_scroll_bar.cc ('k') | ui/views/examples/menu_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 5cde2ea02c7f7a94ba9ed99cc9f23790189ebdef..d5979a8d62e1dec2258266c9918c3d00d64bd7fc 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -987,13 +987,11 @@ void Textfield::ShowContextMenuForView(View* source,
const gfx::Point& point,
ui::MenuSourceType source_type) {
UpdateContextMenu();
- ignore_result(context_menu_runner_->RunMenuAt(
- GetWidget(),
- NULL,
- gfx::Rect(point, gfx::Size()),
- MENU_ANCHOR_TOPLEFT,
- source_type,
- MenuRunner::HAS_MNEMONICS | MenuRunner::CONTEXT_MENU));
+ ignore_result(context_menu_runner_->RunMenuAt(GetWidget(),
+ NULL,
+ gfx::Rect(point, gfx::Size()),
+ MENU_ANCHOR_TOPLEFT,
+ source_type));
}
////////////////////////////////////////////////////////////////////////////////
@@ -1703,7 +1701,9 @@ void Textfield::UpdateContextMenu() {
if (controller_)
controller_->UpdateContextMenu(context_menu_contents_.get());
}
- context_menu_runner_.reset(new MenuRunner(context_menu_contents_.get()));
+ context_menu_runner_.reset(
+ new MenuRunner(context_menu_contents_.get(),
+ MenuRunner::HAS_MNEMONICS | MenuRunner::CONTEXT_MENU));
}
void Textfield::TrackMouseClicks(const ui::MouseEvent& event) {
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar.cc ('k') | ui/views/examples/menu_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698