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

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

Issue 1515203002: Update closing of nested asynchronous menus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | ui/views/controls/menu/menu_controller.cc » ('j') | ui/views/controls/menu/menu_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.h
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index a28c4cc2bcc4272218e9de0065f1deb704795b9f..d499710e46c208877876d10884c3fa8116d5f4ba 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -14,6 +14,7 @@
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
@@ -539,6 +540,11 @@ class VIEWS_EXPORT MenuController : public WidgetObserver {
// Terminates the current nested message-loop.
void TerminateNestedMessageLoop();
+ // Performs the teardown of menus launched with |async_run_|. This will
+ // notifiy the |delegate_|. If |exit_type_| is EXIT_ALL all nested
+ // asynchronous runs will be exited.
+ void ExitAsyncRun();
+
// Performs the teardown of the menu launched by Run(). The selected item is
// returned.
MenuItemView* ExitMenuRun();
@@ -686,6 +692,8 @@ class VIEWS_EXPORT MenuController : public WidgetObserver {
scoped_ptr<MenuMessageLoop> message_loop_;
+ base::WeakPtrFactory<MenuController> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(MenuController);
};
« no previous file with comments | « no previous file | ui/views/controls/menu/menu_controller.cc » ('j') | ui/views/controls/menu/menu_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698