OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ |
6 #define SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ | 6 #define SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <queue> | 11 #include <queue> |
| 12 #include <string> |
| 13 #include <unordered_map> |
12 #include <vector> | 14 #include <vector> |
13 | 15 |
14 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
15 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
16 #include "services/ui/public/interfaces/display_manager.mojom.h" | 18 #include "services/ui/public/interfaces/display_manager.mojom.h" |
17 #include "services/ui/ws/event_dispatcher.h" | 19 #include "services/ui/ws/event_dispatcher.h" |
18 #include "services/ui/ws/event_dispatcher_delegate.h" | 20 #include "services/ui/ws/event_dispatcher_delegate.h" |
19 #include "services/ui/ws/server_window_observer.h" | 21 #include "services/ui/ws/server_window_observer.h" |
20 #include "services/ui/ws/user_id.h" | 22 #include "services/ui/ws/user_id.h" |
21 #include "services/ui/ws/window_server.h" | 23 #include "services/ui/ws/window_server.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 95 |
94 // Processes an event from PlatformDisplay. | 96 // Processes an event from PlatformDisplay. |
95 void ProcessEvent(const Event& event, int64_t display_id); | 97 void ProcessEvent(const Event& event, int64_t display_id); |
96 | 98 |
97 // Called when the ack from an event dispatched to WindowTree |tree| is | 99 // Called when the ack from an event dispatched to WindowTree |tree| is |
98 // received. | 100 // received. |
99 // TODO(sky): make this private and use a callback. | 101 // TODO(sky): make this private and use a callback. |
100 void OnEventAck(mojom::WindowTree* tree, mojom::EventResult result); | 102 void OnEventAck(mojom::WindowTree* tree, mojom::EventResult result); |
101 | 103 |
102 // Called when the WindowManager acks an accelerator. | 104 // Called when the WindowManager acks an accelerator. |
103 void OnAcceleratorAck(mojom::EventResult result); | 105 void OnAcceleratorAck( |
| 106 mojom::EventResult result, |
| 107 const std::unordered_map<std::string, std::vector<uint8_t>>& properties); |
104 | 108 |
105 private: | 109 private: |
106 class ProcessedEventTarget; | 110 class ProcessedEventTarget; |
107 friend class Display; | 111 friend class Display; |
108 friend class test::WindowManagerStateTestApi; | 112 friend class test::WindowManagerStateTestApi; |
109 | 113 |
110 // Set of display roots. This is a vector rather than a set to support removal | 114 // Set of display roots. This is a vector rather than a set to support removal |
111 // without deleting. | 115 // without deleting. |
112 using WindowManagerDisplayRoots = | 116 using WindowManagerDisplayRoots = |
113 std::vector<std::unique_ptr<WindowManagerDisplayRoot>>; | 117 std::vector<std::unique_ptr<WindowManagerDisplayRoot>>; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 293 |
290 base::WeakPtrFactory<WindowManagerState> weak_factory_; | 294 base::WeakPtrFactory<WindowManagerState> weak_factory_; |
291 | 295 |
292 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); | 296 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); |
293 }; | 297 }; |
294 | 298 |
295 } // namespace ws | 299 } // namespace ws |
296 } // namespace ui | 300 } // namespace ui |
297 | 301 |
298 #endif // SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ | 302 #endif // SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ |
OLD | NEW |