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

Unified Diff: ui/views/widget/desktop_aura/desktop_dispatcher_client.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 | « ui/views/widget/desktop_aura/desktop_dispatcher_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_dispatcher_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698