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/mus_constants.mojom"; | 10 import "components/mus/public/interfaces/mus_constants.mojom"; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // unique). Additionally the connection id (embedded in |window_id|) must | 86 // unique). Additionally the connection id (embedded in |window_id|) must |
87 // match that of the connection. | 87 // match that of the connection. |
88 // Errors: | 88 // Errors: |
89 // ERROR_CODE_VALUE_IN_USE: a window already exists with the specified id. | 89 // ERROR_CODE_VALUE_IN_USE: a window already exists with the specified id. |
90 // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |window_id| does not | 90 // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |window_id| does not |
91 // match the connection id of the client. | 91 // match the connection id of the client. |
92 NewWindow(uint32 change_id, | 92 NewWindow(uint32 change_id, |
93 uint32 window_id, | 93 uint32 window_id, |
94 map<string, array<uint8>>? properties); | 94 map<string, array<uint8>>? properties); |
95 | 95 |
96 // Requests the WindowManager to create a new top level window. | 96 // Requests the WindowManager to create a new top level window. On success |
| 97 // OnTopLevelCreated() is called with the WindowData for the new window. On |
| 98 // failure OnChangeCompleted() is called. |
97 // TODO(sky): this likely needs context, maybe in |properties|. | 99 // TODO(sky): this likely needs context, maybe in |properties|. |
98 NewTopLevelWindow(uint32 change_id, | 100 NewTopLevelWindow(uint32 change_id, |
99 uint32 window_id, | 101 uint32 window_id, |
100 map<string, array<uint8>> properties); | 102 map<string, array<uint8>> properties); |
101 | 103 |
102 // Deletes a window. This does not recurse. No hierarchy change notifications | 104 // Deletes a window. This does not recurse. No hierarchy change notifications |
103 // are sent as a result of this. Only the connection that created the window | 105 // are sent as a result of this. Only the connection that created the window |
104 // can delete it. | 106 // can delete it. |
105 DeleteWindow(uint32 change_id, uint32 window_id); | 107 DeleteWindow(uint32 change_id, uint32 window_id); |
106 | 108 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // Invoked when the application embedded at |window| is disconnected. In other | 260 // Invoked when the application embedded at |window| is disconnected. In other |
259 // words the embedded app closes the connection to the server. This is called | 261 // words the embedded app closes the connection to the server. This is called |
260 // on the connection that created |window| as well as any ancestors that have | 262 // on the connection that created |window| as well as any ancestors that have |
261 // the embed root policy. | 263 // the embed root policy. |
262 OnEmbeddedAppDisconnected(uint32 window); | 264 OnEmbeddedAppDisconnected(uint32 window); |
263 | 265 |
264 // Sent when another connection is embedded in the Window this connection was | 266 // Sent when another connection is embedded in the Window this connection was |
265 // previously embedded in. See Embed() for more information. | 267 // previously embedded in. See Embed() for more information. |
266 OnUnembed(uint32 window); | 268 OnUnembed(uint32 window); |
267 | 269 |
| 270 // Called in response to NewTopLevelWindow() successfully completing. |
| 271 OnTopLevelCreated(uint32 change_id, WindowData data); |
| 272 |
268 // Invoked when a window's bounds have changed. | 273 // Invoked when a window's bounds have changed. |
269 OnWindowBoundsChanged(uint32 window, | 274 OnWindowBoundsChanged(uint32 window, |
270 mojo.Rect old_bounds, | 275 mojo.Rect old_bounds, |
271 mojo.Rect new_bounds); | 276 mojo.Rect new_bounds); |
272 | 277 |
273 OnClientAreaChanged(uint32 window_id, | 278 OnClientAreaChanged(uint32 window_id, |
274 mojo.Insets new_client_area, | 279 mojo.Insets new_client_area, |
275 array<mojo.Rect> new_additional_client_areas); | 280 array<mojo.Rect> new_additional_client_areas); |
276 | 281 |
277 OnTransientWindowAdded(uint32 window_id, | 282 OnTransientWindowAdded(uint32 window_id, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 WmResponse(uint32 change_id, bool response); | 389 WmResponse(uint32 change_id, bool response); |
385 | 390 |
386 // Calls WindowTreeClient::RequestClose() on the embedded app at the | 391 // Calls WindowTreeClient::RequestClose() on the embedded app at the |
387 // specified window. | 392 // specified window. |
388 WmRequestClose(uint32 window_id); | 393 WmRequestClose(uint32 window_id); |
389 | 394 |
390 // Response from WmCreateTopLevelWindow() informing the client of the id for | 395 // Response from WmCreateTopLevelWindow() informing the client of the id for |
391 // the new window. | 396 // the new window. |
392 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); | 397 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); |
393 }; | 398 }; |
OLD | NEW |