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 <memory> | 10 #include <memory> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bool got_frame_decoration_values() const { | 68 bool got_frame_decoration_values() const { |
69 return got_frame_decoration_values_; | 69 return got_frame_decoration_values_; |
70 } | 70 } |
71 | 71 |
72 bool SetCapture(ServerWindow* window, bool in_nonclient_area); | 72 bool SetCapture(ServerWindow* window, bool in_nonclient_area); |
73 ServerWindow* capture_window() { return event_dispatcher_.capture_window(); } | 73 ServerWindow* capture_window() { return event_dispatcher_.capture_window(); } |
74 const ServerWindow* capture_window() const { | 74 const ServerWindow* capture_window() const { |
75 return event_dispatcher_.capture_window(); | 75 return event_dispatcher_.capture_window(); |
76 } | 76 } |
77 | 77 |
78 // Checks if |modal_window| is a visible modal window that blocks current | |
79 // capture window and if that's the case, releases the capture. | |
80 void ReleaseCaptureBlockedByModalWindow(const ServerWindow* modal_window); | 78 void ReleaseCaptureBlockedByModalWindow(const ServerWindow* modal_window); |
| 79 void ReleaseCaptureBlockedByAnyModalWindow(); |
81 | 80 |
82 // Checks if the current capture window is blocked by any visible modal window | 81 void AddSystemModalWindow(ServerWindow* window); |
83 // and if that's the case, releases the capture. | |
84 void ReleaseCaptureBlockedByAnyModalWindow(); | |
85 | 82 |
86 // Returns true if this is the WindowManager of the active user. | 83 // Returns true if this is the WindowManager of the active user. |
87 bool IsActive() const; | 84 bool IsActive() const; |
88 | 85 |
89 // TODO(sky): EventDispatcher is really an implementation detail and should | 86 // TODO(sky): EventDispatcher is really an implementation detail and should |
90 // not be exposed. | 87 // not be exposed. |
91 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } | 88 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } |
92 | 89 |
93 void Activate(const gfx::Point& mouse_location_on_screen); | 90 void Activate(const gfx::Point& mouse_location_on_screen); |
94 void Deactivate(); | 91 void Deactivate(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 188 |
192 EventDispatcher event_dispatcher_; | 189 EventDispatcher event_dispatcher_; |
193 | 190 |
194 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); | 191 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); |
195 }; | 192 }; |
196 | 193 |
197 } // namespace ws | 194 } // namespace ws |
198 } // namespace mus | 195 } // namespace mus |
199 | 196 |
200 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ | 197 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ |
OLD | NEW |