diff options
Diffstat (limited to 'ash/accelerators/nested_dispatcher_controller.cc')
-rw-r--r-- | ash/accelerators/nested_dispatcher_controller.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ash/accelerators/nested_dispatcher_controller.cc b/ash/accelerators/nested_dispatcher_controller.cc index c551e94..6977f07 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 |