summaryrefslogtreecommitdiffstats
path: root/ash/accelerators/nested_dispatcher_controller.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 01:19:48 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 01:19:48 +0000
commit7d8dce44a24a628b361a668550fedcbe5c78f03b (patch)
tree6502fab22a7c53b5774f63189d03adb61d1b292a /ash/accelerators/nested_dispatcher_controller.h
parentd080d3e45d72575612058097b338c9aad8ef481c (diff)
downloadchromium_src-7d8dce44a24a628b361a668550fedcbe5c78f03b.zip
chromium_src-7d8dce44a24a628b361a668550fedcbe5c78f03b.tar.gz
chromium_src-7d8dce44a24a628b361a668550fedcbe5c78f03b.tar.bz2
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 is no longer a MessagePumpDispatcher. 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. This change was previously committed in r253723 and r254089, but reverted in r253744 and r254095 because some interactive_ui_tests on windows bots failed on SimpleMessageBoxViews related change. So this CL aims to reland that CL without the change in SimpleMessageBoxViews for now. BUG=342338 R=sky@chromium.org Review URL: https://codereview.chromium.org/192743007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/nested_dispatcher_controller.h')
-rw-r--r--ash/accelerators/nested_dispatcher_controller.h5
1 files changed, 5 insertions, 0 deletions
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);
};