Index: ui/views/widget/desktop_aura/desktop_dispatcher_client.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc b/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc |
index be251da5c35cf77329f01eca9ebff2fd1f3bb1dd..977d0de222607d4209dcec736c0e0f27a2ef830d 100644 |
--- a/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc |
+++ b/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc |
@@ -4,6 +4,7 @@ |
#include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" |
+#include "base/auto_reset.h" |
#include "base/run_loop.h" |
namespace views { |
@@ -23,7 +24,14 @@ void DesktopDispatcherClient::RunWithDispatcher( |
base::MessageLoopForUI::ScopedNestableTaskAllower allow_nested(loop); |
base::RunLoop run_loop(nested_dispatcher); |
+ base::AutoReset<base::Closure> reset_closure(&quit_closure_, |
+ run_loop.QuitClosure()); |
run_loop.Run(); |
} |
+void DesktopDispatcherClient::QuitNestedMessageLoop() { |
+ CHECK(!quit_closure_.is_null()); |
+ quit_closure_.Run(); |
+} |
+ |
} // namespace views |