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