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

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

Issue 2394123002: Views: Expose an on_closed callback via the MenuRunner constructor. (Closed)
Patch Set: default arg 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
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3e611f6e426c1548ce4045da5bf71f7fb8932cc4 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.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/base/ui_base_types.h"
@@ -105,9 +106,14 @@ class VIEWS_EXPORT MenuRunner {
NORMAL_EXIT
};
- // Creates a new MenuRunner.
- // |run_types| is a bitmask of RunTypes.
- MenuRunner(ui::MenuModel* menu_model, int32_t run_types);
+ // 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 = base::Closure());
+
+ // Creates a runner for a custom-created toolkit-views menu.
MenuRunner(MenuItemView* menu, int32_t run_types);
~MenuRunner();
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698