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 |