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

Side by Side Diff: ash/accelerators/nested_dispatcher_controller.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ 5 #ifndef ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
6 #define ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ 6 #define ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/callback.h"
9 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
10 #include "ui/aura/client/dispatcher_client.h" 11 #include "ui/aura/client/dispatcher_client.h"
11 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 // Creates a dispatcher which wraps another dispatcher. 16 // Creates a dispatcher which wraps another dispatcher.
16 // The outer dispatcher runs first and performs ash specific handling. 17 // The outer dispatcher runs first and performs ash specific handling.
17 // If it does not consume the event it forwards the event to the nested 18 // If it does not consume the event it forwards the event to the nested
18 // dispatcher. 19 // dispatcher.
19 class ASH_EXPORT NestedDispatcherController 20 class ASH_EXPORT NestedDispatcherController
20 : public aura::client::DispatcherClient { 21 : public aura::client::DispatcherClient {
21 public: 22 public:
22 NestedDispatcherController(); 23 NestedDispatcherController();
23 virtual ~NestedDispatcherController(); 24 virtual ~NestedDispatcherController();
24 25
26 // aura::client::DispatcherClient:
25 virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher, 27 virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher,
26 aura::Window* associated_window) OVERRIDE; 28 aura::Window* associated_window) OVERRIDE;
29 virtual void QuitNestedMessageLoop() OVERRIDE;
27 30
28 private: 31 private:
32 base::Closure quit_closure_;
33
29 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController); 34 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController);
30 }; 35 };
31 36
32 } // namespace ash 37 } // namespace ash
33 38
34 #endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ 39 #endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_dispatcher.cc ('k') | ash/accelerators/nested_dispatcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698