Chromium Code Reviews| 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 ui.mojom; | 5 module ui.mojom; |
| 6 | 6 |
| 7 import "cc/ipc/surface_info.mojom"; | 7 import "cc/ipc/surface_info.mojom"; |
| 8 import "cc/ipc/mojo_compositor_frame_sink.mojom"; | 8 import "cc/ipc/mojo_compositor_frame_sink.mojom"; |
| 9 import "services/ui/public/interfaces/cursor.mojom"; | 9 import "services/ui/public/interfaces/cursor.mojom"; |
| 10 import "services/ui/public/interfaces/event_matcher.mojom"; | 10 import "services/ui/public/interfaces/event_matcher.mojom"; |
| 11 import "services/ui/public/interfaces/mus_constants.mojom"; | 11 import "services/ui/public/interfaces/mus_constants.mojom"; |
| 12 import "services/ui/public/interfaces/window_manager.mojom"; | 12 import "services/ui/public/interfaces/window_manager.mojom"; |
| 13 import "services/ui/public/interfaces/window_manager_constants.mojom"; | 13 import "services/ui/public/interfaces/window_manager_constants.mojom"; |
| 14 import "services/ui/public/interfaces/window_tree_constants.mojom"; | 14 import "services/ui/public/interfaces/window_tree_constants.mojom"; |
| 15 import "ui/base/mojo/ui_base_types.mojom"; | |
| 15 import "ui/events/mojo/event.mojom"; | 16 import "ui/events/mojo/event.mojom"; |
| 16 import "ui/gfx/geometry/mojo/geometry.mojom"; | 17 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 17 import "ui/platform_window/mojo/text_input_state.mojom"; | 18 import "ui/platform_window/mojo/text_input_state.mojom"; |
| 18 | 19 |
| 19 // Windows are identified by a uint32. The upper 16 bits are the connection id, | 20 // Windows are identified by a uint32. The upper 16 bits are the connection id, |
| 20 // and the lower 16 the id assigned by the client. | 21 // and the lower 16 the id assigned by the client. |
| 21 // | 22 // |
| 22 // The root window is identified with a connection id of 0, and value of 1. | 23 // The root window is identified with a connection id of 0, and value of 1. |
| 23 // | 24 // |
| 24 // Most functions to the WindowTree take a change_id parameter. When | 25 // Most functions to the WindowTree take a change_id parameter. When |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 // . |transient_window_id| is an ancestor of |window_id|. | 170 // . |transient_window_id| is an ancestor of |window_id|. |
| 170 // . |transient_window_id| is modal to system. | 171 // . |transient_window_id| is modal to system. |
| 171 AddTransientWindow(uint32 change_id, | 172 AddTransientWindow(uint32 change_id, |
| 172 uint32 window_id, | 173 uint32 window_id, |
| 173 uint32 transient_window_id); | 174 uint32 transient_window_id); |
| 174 | 175 |
| 175 // Decouples the lifetime of |transient_window_id| from its transient parent. | 176 // Decouples the lifetime of |transient_window_id| from its transient parent. |
| 176 // This does not change transient window's position in the window hierarchy. | 177 // This does not change transient window's position in the window hierarchy. |
| 177 RemoveTransientWindowFromParent(uint32 change_id, uint32 transient_window_id); | 178 RemoveTransientWindowFromParent(uint32 change_id, uint32 transient_window_id); |
| 178 | 179 |
| 179 // Sets |window_id| to be modal. If the window has a transient parent, then | 180 // Sets |window_id| to be modal. If the window has a transient parent, then |
|
sky
2017/02/24 20:18:53
You'll want to update this comment.
Hadi
2017/02/28 20:29:07
Done.
| |
| 180 // the window is modal to the transient parent. Otherwise, the window is modal | 181 // the window is modal to the transient parent. Otherwise, the window is modal |
| 181 // to the system. This releases capture if necessary. | 182 // to the system. This releases capture if necessary. |
| 182 // This fails for any of the following reasons: | 183 // This fails for any of the following reasons: |
| 183 // . |window_id| does not identify a valid window. | 184 // . |window_id| does not identify a valid window. |
| 184 // . Client does not have a valid user id (i.e., it is an embedded app). | 185 // . Client does not have a valid user id (i.e., it is an embedded app). |
| 185 SetModal(uint32 change_id, uint32 window_id); | 186 SetModal(uint32 change_id, uint32 window_id, ModalType type); |
| 186 | 187 |
| 187 // Reorders a window in its parent, relative to |relative_window_id| according | 188 // Reorders a window in its parent, relative to |relative_window_id| according |
| 188 // to |direction|. Only the connection that created the window's parent can | 189 // to |direction|. Only the connection that created the window's parent can |
| 189 // reorder its children. | 190 // reorder its children. |
| 190 ReorderWindow(uint32 change_id, | 191 ReorderWindow(uint32 change_id, |
| 191 uint32 window_id, | 192 uint32 window_id, |
| 192 uint32 relative_window_id, | 193 uint32 relative_window_id, |
| 193 OrderDirection direction); | 194 OrderDirection direction); |
| 194 | 195 |
| 195 // Returns the windows comprising the tree starting at |window_id|. | 196 // Returns the windows comprising the tree starting at |window_id|. |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 // See description of WindowManager for details. | 502 // See description of WindowManager for details. |
| 502 GetWindowManager(associated WindowManager& internal); | 503 GetWindowManager(associated WindowManager& internal); |
| 503 }; | 504 }; |
| 504 | 505 |
| 505 // Mus provides this interface as a way for clients to connect and obtain a | 506 // Mus provides this interface as a way for clients to connect and obtain a |
| 506 // WindowTree handle with a supplied WindowTreeClient handle. The | 507 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 507 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 508 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 508 interface WindowTreeFactory { | 509 interface WindowTreeFactory { |
| 509 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 510 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 510 }; | 511 }; |
| OLD | NEW |