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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const Display* display() const { return display_; } | 59 const Display* display() const { return display_; } |
60 | 60 |
61 void SetFrameDecorationValues(mojom::FrameDecorationValuesPtr values); | 61 void SetFrameDecorationValues(mojom::FrameDecorationValuesPtr values); |
62 const mojom::FrameDecorationValues& frame_decoration_values() const { | 62 const mojom::FrameDecorationValues& frame_decoration_values() const { |
63 return *frame_decoration_values_; | 63 return *frame_decoration_values_; |
64 } | 64 } |
65 bool got_frame_decoration_values() const { | 65 bool got_frame_decoration_values() const { |
66 return got_frame_decoration_values_; | 66 return got_frame_decoration_values_; |
67 } | 67 } |
68 | 68 |
69 void SetCapture(ServerWindow* window, bool in_nonclient_area); | 69 bool SetCapture(ServerWindow* window, bool in_nonclient_area); |
70 ServerWindow* capture_window() { return event_dispatcher_.capture_window(); } | 70 ServerWindow* capture_window() { return event_dispatcher_.capture_window(); } |
71 const ServerWindow* capture_window() const { | 71 const ServerWindow* capture_window() const { |
72 return event_dispatcher_.capture_window(); | 72 return event_dispatcher_.capture_window(); |
73 } | 73 } |
74 | 74 |
| 75 // Checks if |modal_window| is a visible modal window that blocks current |
| 76 // capture window and if that's the case, releases the capture. |
| 77 void ReleaseCaptureBlockedByModalWindow(const ServerWindow* modal_window); |
| 78 |
| 79 // Checks if the current capture window is blocked by any visible modal window |
| 80 // and if that's the case, releases the capture. |
| 81 void ReleaseCaptureBlockedByAnyModalWindow(); |
| 82 |
75 // Returns true if this is the WindowManager of the active user. | 83 // Returns true if this is the WindowManager of the active user. |
76 bool IsActive() const; | 84 bool IsActive() const; |
77 | 85 |
78 // TODO(sky): EventDispatcher is really an implementation detail and should | 86 // TODO(sky): EventDispatcher is really an implementation detail and should |
79 // not be exposed. | 87 // not be exposed. |
80 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } | 88 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } |
81 | 89 |
82 // Processes an event from PlatformDisplay. | 90 // Processes an event from PlatformDisplay. |
83 void ProcessEvent(const ui::Event& event); | 91 void ProcessEvent(const ui::Event& event); |
84 | 92 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 178 |
171 EventDispatcher event_dispatcher_; | 179 EventDispatcher event_dispatcher_; |
172 | 180 |
173 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); | 181 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); |
174 }; | 182 }; |
175 | 183 |
176 } // namespace ws | 184 } // namespace ws |
177 } // namespace mus | 185 } // namespace mus |
178 | 186 |
179 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ | 187 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ |
OLD | NEW |