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

Unified Diff: ui/views/controls/menu/menu_runner.h

Issue 2394123002: Views: Expose an on_closed callback via the MenuRunner constructor. (Closed)
Patch Set: NON_EXPORTED_BASE Created 4 years, 2 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.h
diff --git a/ui/views/controls/menu/menu_runner.h b/ui/views/controls/menu/menu_runner.h
index 1bbc905e2ba9670e3c66c721adf606320b0087a5..0be64f9bca928c1a637703276e5c19fe1eb05fa1 100644
--- a/ui/views/controls/menu/menu_runner.h
+++ b/ui/views/controls/menu/menu_runner.h
@@ -9,6 +9,7 @@
#include <memory>
+#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/base/ui_base_types.h"
@@ -105,9 +106,15 @@ class VIEWS_EXPORT MenuRunner {
NORMAL_EXIT
};
- // Creates a new MenuRunner.
- // |run_types| is a bitmask of RunTypes.
+ // Creates a new MenuRunner, which may use a native menu if available.
+ // |run_types| is a bitmask of RunTypes. If provided,
+ // |on_menu_closed_callback| is invoked when the menu is closed.
+ MenuRunner(ui::MenuModel* menu_model,
+ int32_t run_types,
+ const base::Closure& on_menu_closed_callback);
MenuRunner(ui::MenuModel* menu_model, int32_t run_types);
tapted 2016/10/12 10:05:21 Patchset 2 didn't keep this overload - there's a b
jonross 2016/10/12 14:35:18 There are some clients which are transient. The vi
+
+ // Creates a runner for a custom-created toolkit-views menu.
MenuRunner(MenuItemView* menu, int32_t run_types);
tapted 2016/10/12 10:05:21 I looked around for other things that might miss o
~MenuRunner();

Powered by Google App Engine
This is Rietveld 408576698