From 24d5f5688319b8b673a5b0121138d41ede949a71 Mon Sep 17 00:00:00 2001 From: "sadrul@chromium.org" Date: Fri, 28 Feb 2014 10:41:04 +0000 Subject: Use the default dispatcher where possible for nested message loops. Notable changes: * Add QuitNestedMessageLoop() to client::DispatcherClient, which can be used to terminate a nested loop started by RunWithDispatcher(). * FirstRunDialog and SimpleMessageBoxViews are no longer MessagePumpDispatchers. The default dispatcher is used instead, and QuitNestedMessageLoop() is called to terminate the loop instead of returning POST_DISPATCH_QUIT_LOOP from the Dispatch() override. BUG=none R=sky@chromium.org Previously committed in r253723, but reverted in r253744 because it broke interactive_ui_tests on win-dbg. Review URL: https://codereview.chromium.org/182143002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254089 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/accelerators/nested_dispatcher_controller.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ash/accelerators/nested_dispatcher_controller.h') diff --git a/ash/accelerators/nested_dispatcher_controller.h b/ash/accelerators/nested_dispatcher_controller.h index 958cbae..1f8b52e 100644 --- a/ash/accelerators/nested_dispatcher_controller.h +++ b/ash/accelerators/nested_dispatcher_controller.h @@ -6,6 +6,7 @@ #define ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ #include "ash/ash_export.h" +#include "base/callback.h" #include "base/message_loop/message_loop.h" #include "ui/aura/client/dispatcher_client.h" #include "ui/aura/window.h" @@ -22,10 +23,14 @@ class ASH_EXPORT NestedDispatcherController NestedDispatcherController(); virtual ~NestedDispatcherController(); + // aura::client::DispatcherClient: virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher, aura::Window* associated_window) OVERRIDE; + virtual void QuitNestedMessageLoop() OVERRIDE; private: + base::Closure quit_closure_; + DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController); }; -- cgit v1.1