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

Unified Diff: ui/views/controls/menu/menu_runner_impl_cocoa.mm

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: ui/views/controls/menu/menu_runner_impl_cocoa.mm
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
index f4ac01b23dfaca81057923800d8aca9e8efcae6e..62a758fcbd5e2f1dd6ca05a1fa8028a0537a7044 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -121,11 +121,11 @@ void MenuRunnerImplCocoa::Release() {
}
}
-MenuRunner::RunResult MenuRunnerImplCocoa::RunMenuAt(Widget* parent,
- MenuButton* button,
- const gfx::Rect& bounds,
- MenuAnchorPosition anchor,
- int32_t run_types) {
+void MenuRunnerImplCocoa::RunMenuAt(Widget* parent,
+ MenuButton* button,
+ const gfx::Rect& bounds,
+ MenuAnchorPosition anchor,
+ int32_t run_types) {
DCHECK(run_types & kNativeRunTypes);
DCHECK(!IsRunning());
DCHECK(parent);
@@ -155,15 +155,13 @@ MenuRunner::RunResult MenuRunnerImplCocoa::RunMenuAt(Widget* parent,
if (delete_after_run_) {
delete this;
- return MenuRunner::MENU_DELETED;
+ return;
}
// Don't invoke the callback if Release() was called, since that usually means
// the owning instance is being destroyed.
if (!on_menu_closed_callback_.is_null())
on_menu_closed_callback_.Run();
-
- return MenuRunner::NORMAL_EXIT;
}
void MenuRunnerImplCocoa::Cancel() {
« no previous file with comments | « ui/views/controls/menu/menu_runner_impl_cocoa.h ('k') | ui/views/controls/menu/menu_runner_impl_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698