OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 import "components/mus/public/interfaces/compositor_frame.mojom"; | 7 import "components/mus/public/interfaces/compositor_frame.mojom"; |
8 import "components/mus/public/interfaces/cursor.mojom"; | 8 import "components/mus/public/interfaces/cursor.mojom"; |
9 import "components/mus/public/interfaces/input_events.mojom"; | 9 import "components/mus/public/interfaces/input_events.mojom"; |
10 import "components/mus/public/interfaces/input_event_matcher.mojom"; | 10 import "components/mus/public/interfaces/input_event_matcher.mojom"; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 // Removes a window from its current parent. This fails if the window is not | 163 // Removes a window from its current parent. This fails if the window is not |
164 // valid or the window already has no parent. | 164 // valid or the window already has no parent. |
165 // | 165 // |
166 // Removing a window from a parent may result in OnWindowDeleted() being sent | 166 // Removing a window from a parent may result in OnWindowDeleted() being sent |
167 // to other connections. For example, connection A has windows 1 and 2, with 2 | 167 // to other connections. For example, connection A has windows 1 and 2, with 2 |
168 // a child of 1. Connection B has a root 1. If 2 is removed from 1 then B gets | 168 // a child of 1. Connection B has a root 1. If 2 is removed from 1 then B gets |
169 // OnWindowDeleted(). This is done as window 2 is effectively no longer | 169 // OnWindowDeleted(). This is done as window 2 is effectively no longer |
170 // visible to connection B. | 170 // visible to connection B. |
171 RemoveWindowFromParent(uint32 change_id, uint32 window_id); | 171 RemoveWindowFromParent(uint32 change_id, uint32 window_id); |
172 | 172 |
173 // Ties the lifetime of |child| to the lifetime of |parent|. This also | 173 // Ties the lifetime of |transient_window_id| to the lifetime of |window_id|. |
174 // places |child| always on top of |parent|. | 174 // This also places |transient_window_id| always on top of |window_id|. |
sky
2016/04/29 00:23:18
nit: remove 'always'.
mohsen
2016/04/29 03:33:37
Done.
| |
175 // |transient_window_id| should not be a system modal window. | |
sky
2016/04/29 00:23:18
Fails if |transient|window_id| is a system modal w
mohsen
2016/04/29 03:33:37
I think "Fails if" is used in comments whenever th
| |
175 // This fails for any of the following reasons: | 176 // This fails for any of the following reasons: |
176 // . |window_id| or |transient_window_id| does not identify a valid window. | 177 // . |window_id| or |transient_window_id| does not identify a valid window. |
177 // . |transient_window_id| is an ancestor of |window_id|. | 178 // . |transient_window_id| is an ancestor of |window_id|. |
178 AddTransientWindow(uint32 change_id, | 179 AddTransientWindow(uint32 change_id, |
179 uint32 window_id, | 180 uint32 window_id, |
180 uint32 transient_window_id); | 181 uint32 transient_window_id); |
181 | 182 |
182 // Decouples the lifetime of |transient_window_id| from its transient parent. | 183 // Decouples the lifetime of |transient_window_id| from its transient parent. |
183 // This does not change transient window's position in the window hierarchy. | 184 // This does not change transient window's position in the window hierarchy. |
184 RemoveTransientWindowFromParent(uint32 change_id, uint32 transient_window_id); | 185 RemoveTransientWindowFromParent(uint32 change_id, uint32 transient_window_id); |
185 | 186 |
186 // Sets |window_id| to be modal to its transient parent. | 187 // Sets |window_id| to be modal. It would be modal to its transient parent if |
sky
2016/04/29 00:23:18
If the window has a transient parent, then the win
mohsen
2016/04/29 03:33:37
Done.
| |
187 // This fails if |window_id| does not identify a valid window. | 188 // it has one. Otherwise, it would be modal to the whole system. It will also |
188 // TODO(mohsen): If |window_id| does not have a transient parent, this will | 189 // release capture if necessary. |
189 // have no effect. Plan is to make a window modal to system if it does not | 190 // This fails for any of the following reasons: |
190 // have a transient parent. | 191 // . |window_id| does not identify a valid window. |
192 // . Client does not have a valid user id (i.e., it is an embedded app). | |
191 SetModal(uint32 change_id, uint32 window_id); | 193 SetModal(uint32 change_id, uint32 window_id); |
192 | 194 |
193 // Reorders a window in its parent, relative to |relative_window_id| according | 195 // Reorders a window in its parent, relative to |relative_window_id| according |
194 // to |direction|. Only the connection that created the window's parent can | 196 // to |direction|. Only the connection that created the window's parent can |
195 // reorder its children. | 197 // reorder its children. |
196 ReorderWindow(uint32 change_id, | 198 ReorderWindow(uint32 change_id, |
197 uint32 window_id, | 199 uint32 window_id, |
198 uint32 relative_window_id, | 200 uint32 relative_window_id, |
199 OrderDirection direction); | 201 OrderDirection direction); |
200 | 202 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
400 // See description of WindowManager for details. | 402 // See description of WindowManager for details. |
401 GetWindowManager(associated WindowManager& internal); | 403 GetWindowManager(associated WindowManager& internal); |
402 }; | 404 }; |
403 | 405 |
404 // Mus provides this interface as a way for clients to connect and obtain a | 406 // Mus provides this interface as a way for clients to connect and obtain a |
405 // WindowTree handle with a supplied WindowTreeClient handle. The | 407 // WindowTree handle with a supplied WindowTreeClient handle. The |
406 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 408 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
407 interface WindowTreeFactory { | 409 interface WindowTreeFactory { |
408 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 410 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
409 }; | 411 }; |
OLD | NEW |