OLD | NEW |
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/callback.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "ui/wm/public/dispatcher_client.h" | 11 #include "ui/wm/public/dispatcher_client.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 | 14 |
| 15 class AcceleratorDispatcher; |
| 16 |
15 // Creates a dispatcher which wraps another dispatcher. | 17 // Creates a dispatcher which wraps another dispatcher. |
16 // The outer dispatcher runs first and performs ash specific handling. | 18 // 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 | 19 // If it does not consume the event it forwards the event to the nested |
18 // dispatcher. | 20 // dispatcher. |
19 class ASH_EXPORT NestedDispatcherController | 21 class ASH_EXPORT NestedDispatcherController |
20 : public aura::client::DispatcherClient { | 22 : public aura::client::DispatcherClient { |
21 public: | 23 public: |
22 NestedDispatcherController(); | 24 NestedDispatcherController(); |
23 virtual ~NestedDispatcherController(); | 25 virtual ~NestedDispatcherController(); |
24 | 26 |
25 // aura::client::DispatcherClient: | 27 // aura::client::DispatcherClient: |
26 virtual void RunWithDispatcher( | 28 virtual void RunWithDispatcher( |
27 base::MessagePumpDispatcher* dispatcher) OVERRIDE; | 29 base::MessagePumpDispatcher* dispatcher) OVERRIDE; |
28 virtual void QuitNestedMessageLoop() OVERRIDE; | 30 virtual void QuitNestedMessageLoop() OVERRIDE; |
29 | 31 |
30 private: | 32 private: |
31 base::Closure quit_closure_; | 33 base::Closure quit_closure_; |
| 34 scoped_ptr<AcceleratorDispatcher> accelerator_dispatcher_; |
32 | 35 |
33 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController); | 36 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController); |
34 }; | 37 }; |
35 | 38 |
36 } // namespace ash | 39 } // namespace ash |
37 | 40 |
38 #endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ | 41 #endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ |
OLD | NEW |