OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_MUS_EVENT_DISPATCHER_H_ | 5 #ifndef COMPONENTS_MUS_EVENT_DISPATCHER_H_ |
6 #define COMPONENTS_MUS_EVENT_DISPATCHER_H_ | 6 #define COMPONENTS_MUS_EVENT_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "ui/mojo/events/input_event_constants.mojom.h" | 11 #include "ui/mojo/events/input_event_constants.mojom.h" |
12 #include "ui/mojo/events/input_events.mojom.h" | 12 #include "ui/mojo/events/input_events.mojom.h" |
13 #include "ui/mojo/events/input_key_codes.mojom.h" | 13 #include "ui/mojo/events/input_key_codes.mojom.h" |
14 | 14 |
15 namespace view_manager { | 15 namespace mus { |
16 | 16 |
17 class ServerView; | 17 class ServerView; |
18 class ViewTreeHostImpl; | 18 class ViewTreeHostImpl; |
19 | 19 |
20 // Handles dispatching events to the right location as well as updating focus. | 20 // Handles dispatching events to the right location as well as updating focus. |
21 class EventDispatcher { | 21 class EventDispatcher { |
22 public: | 22 public: |
23 explicit EventDispatcher(ViewTreeHostImpl* view_tree_host); | 23 explicit EventDispatcher(ViewTreeHostImpl* view_tree_host); |
24 ~EventDispatcher(); | 24 ~EventDispatcher(); |
25 | 25 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 ServerView* FindEventTarget(mojo::Event* event); | 58 ServerView* FindEventTarget(mojo::Event* event); |
59 | 59 |
60 ViewTreeHostImpl* view_tree_host_; | 60 ViewTreeHostImpl* view_tree_host_; |
61 | 61 |
62 using Entry = std::pair<uint32_t, Accelerator>; | 62 using Entry = std::pair<uint32_t, Accelerator>; |
63 std::map<uint32_t, Accelerator> accelerators_; | 63 std::map<uint32_t, Accelerator> accelerators_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); | 65 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace view_manager | 68 } // namespace mus |
69 | 69 |
70 #endif // COMPONENTS_MUS_EVENT_DISPATCHER_H_ | 70 #endif // COMPONENTS_MUS_EVENT_DISPATCHER_H_ |
OLD | NEW |