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