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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 2790773002: Cleanup MenuRunner API (Closed)
Patch Set: Rebase Created 3 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/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 50ee412ecedbe8c557d41d99794b433bbd4cead8..17b5979754292b9150745b468c40f6cdd1b9d5be 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -214,12 +214,11 @@ void ToolbarButton::ShowDropDownMenu(ui::MenuSourceType source_type) {
model_.get(),
base::Bind(&ToolbarButton::OnMenuClosed, base::Unretained(this))));
menu_model_adapter_->set_triggerable_event_flags(triggerable_event_flags());
- menu_runner_.reset(new views::MenuRunner(
- menu_model_adapter_->CreateMenu(),
- views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::ASYNC));
- ignore_result(menu_runner_->RunMenuAt(
- GetWidget(), nullptr, gfx::Rect(menu_position, gfx::Size(0, 0)),
- views::MENU_ANCHOR_TOPLEFT, source_type));
+ menu_runner_.reset(new views::MenuRunner(menu_model_adapter_->CreateMenu(),
+ views::MenuRunner::HAS_MNEMONICS));
+ menu_runner_->RunMenuAt(GetWidget(), nullptr,
+ gfx::Rect(menu_position, gfx::Size(0, 0)),
+ views::MENU_ANCHOR_TOPLEFT, source_type);
}
void ToolbarButton::OnMenuClosed() {
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view.cc ('k') | chrome/browser/ui/views/translate/translate_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698