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

Unified Diff: ui/views/controls/menu/menu_runner.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
« no previous file with comments | « ui/views/controls/menu/menu_runner.h ('k') | ui/views/controls/menu/menu_runner_cocoa_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_runner.cc
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
index 935df8de976873e7ef0f5206f33b6006ac80b08d..991f76bc48a89261a695e03da2ee81a803758506 100644
--- a/ui/views/controls/menu/menu_runner.cc
+++ b/ui/views/controls/menu/menu_runner.cc
@@ -28,11 +28,11 @@ MenuRunner::~MenuRunner() {
impl_->Release();
}
-MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent,
- MenuButton* button,
- const gfx::Rect& bounds,
- MenuAnchorPosition anchor,
- ui::MenuSourceType source_type) {
+void MenuRunner::RunMenuAt(Widget* parent,
+ MenuButton* button,
+ const gfx::Rect& bounds,
+ MenuAnchorPosition anchor,
+ ui::MenuSourceType source_type) {
// If we are shown on mouse press, we will eat the subsequent mouse down and
// the parent widget will not be able to reset its state (it might have mouse
// capture from the mouse down). So we clear its state here.
@@ -40,8 +40,9 @@ MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent,
parent->GetRootView()->SetMouseHandler(nullptr);
if (runner_handler_.get()) {
- return runner_handler_->RunMenuAt(
- parent, button, bounds, anchor, source_type, run_types_);
+ runner_handler_->RunMenuAt(parent, button, bounds, anchor, source_type,
+ run_types_);
+ return;
}
// The parent of the nested menu will have created a DisplayChangeListener, so
@@ -68,7 +69,7 @@ MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent,
}
}
- return impl_->RunMenuAt(parent, button, bounds, anchor, run_types_);
+ impl_->RunMenuAt(parent, button, bounds, anchor, run_types_);
}
bool MenuRunner::IsRunning() const {
« no previous file with comments | « ui/views/controls/menu/menu_runner.h ('k') | ui/views/controls/menu/menu_runner_cocoa_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698