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

Unified Diff: ash/accelerators/nested_dispatcher_controller.cc

Issue 192743007: Use the default dispatcher where possible for nested message loops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert change in SimpleMessageBoxViews. Created 6 years, 9 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 | « ash/accelerators/nested_dispatcher_controller.h ('k') | chrome/browser/ui/views/first_run_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/nested_dispatcher_controller.cc
diff --git a/ash/accelerators/nested_dispatcher_controller.cc b/ash/accelerators/nested_dispatcher_controller.cc
index c551e948a5f0a59fb10184e319dbb53bd1cf5436..6977f07952ed5a8f08dc9596d94c01fc32b3a00a 100644
--- a/ash/accelerators/nested_dispatcher_controller.cc
+++ b/ash/accelerators/nested_dispatcher_controller.cc
@@ -6,6 +6,7 @@
#include "ash/accelerators/accelerator_dispatcher.h"
#include "ash/shell.h"
+#include "base/auto_reset.h"
#include "base/run_loop.h"
namespace ash {
@@ -27,7 +28,14 @@ void NestedDispatcherController::RunWithDispatcher(
// TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
// use run_loop.QuitClosure().
base::RunLoop run_loop(&dispatcher);
+ base::AutoReset<base::Closure> reset_closure(&quit_closure_,
+ run_loop.QuitClosure());
run_loop.Run();
}
+void NestedDispatcherController::QuitNestedMessageLoop() {
+ CHECK(!quit_closure_.is_null());
+ quit_closure_.Run();
+}
+
} // namespace ash
« no previous file with comments | « ash/accelerators/nested_dispatcher_controller.h ('k') | chrome/browser/ui/views/first_run_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698