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 COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ | 5 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ |
6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ | 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // not be exposed. | 89 // not be exposed. |
90 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } | 90 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } |
91 | 91 |
92 void Activate(const gfx::Point& mouse_location_on_screen); | 92 void Activate(const gfx::Point& mouse_location_on_screen); |
93 void Deactivate(); | 93 void Deactivate(); |
94 | 94 |
95 // Processes an event from PlatformDisplay. | 95 // Processes an event from PlatformDisplay. |
96 void ProcessEvent(const ui::Event& event); | 96 void ProcessEvent(const ui::Event& event); |
97 | 97 |
98 // Called when the ack from an event dispatched to WindowTree |tree| is | 98 // Called when the ack from an event dispatched to WindowTree |tree| is |
99 // received. When |handled| is true, the client consumed the event. | 99 // received. |
100 // TODO(sky): make this private and use a callback. | 100 // TODO(sky): make this private and use a callback. |
101 void OnEventAck(mojom::WindowTree* tree, bool handled); | 101 void OnEventAck(mojom::WindowTree* tree, mojom::EventResult result); |
102 | 102 |
103 // Returns a mojom::Display for the specified display. WindowManager specific | 103 // Returns a mojom::Display for the specified display. WindowManager specific |
104 // values are not set. | 104 // values are not set. |
105 mojom::DisplayPtr ToMojomDisplay() const; | 105 mojom::DisplayPtr ToMojomDisplay() const; |
106 | 106 |
107 void OnWillDestroyTree(WindowTree* tree); | 107 void OnWillDestroyTree(WindowTree* tree); |
108 | 108 |
109 private: | 109 private: |
110 class ProcessedEventTarget; | 110 class ProcessedEventTarget; |
111 friend class Display; | 111 friend class Display; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 EventDispatcher event_dispatcher_; | 189 EventDispatcher event_dispatcher_; |
190 | 190 |
191 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); | 191 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); |
192 }; | 192 }; |
193 | 193 |
194 } // namespace ws | 194 } // namespace ws |
195 } // namespace mus | 195 } // namespace mus |
196 | 196 |
197 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ | 197 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ |
OLD | NEW |