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_id.mojom"; | 7 import "cc/ipc/surface_id.mojom"; |
| 8 import "cc/ipc/surface_sequence.mojom"; | |
| 8 import "services/ui/public/interfaces/cursor.mojom"; | 9 import "services/ui/public/interfaces/cursor.mojom"; |
| 9 import "services/ui/public/interfaces/event_matcher.mojom"; | 10 import "services/ui/public/interfaces/event_matcher.mojom"; |
| 10 import "services/ui/public/interfaces/mus_constants.mojom"; | 11 import "services/ui/public/interfaces/mus_constants.mojom"; |
| 11 import "services/ui/public/interfaces/surface.mojom"; | 12 import "services/ui/public/interfaces/surface.mojom"; |
| 12 import "services/ui/public/interfaces/window_manager.mojom"; | 13 import "services/ui/public/interfaces/window_manager.mojom"; |
| 13 import "services/ui/public/interfaces/window_manager_constants.mojom"; | 14 import "services/ui/public/interfaces/window_manager_constants.mojom"; |
| 14 import "services/ui/public/interfaces/window_tree_constants.mojom"; | 15 import "services/ui/public/interfaces/window_tree_constants.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"; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 | 136 |
| 136 // Sets the opacity of the specified window to |opacity|. | 137 // Sets the opacity of the specified window to |opacity|. |
| 137 SetWindowOpacity(uint32 change_id, uint32 window_id, float opacity); | 138 SetWindowOpacity(uint32 change_id, uint32 window_id, float opacity); |
| 138 | 139 |
| 139 // Attaches a Surface to a particular window. | 140 // Attaches a Surface to a particular window. |
| 140 AttachSurface(uint32 window_id, | 141 AttachSurface(uint32 window_id, |
| 141 SurfaceType type, | 142 SurfaceType type, |
| 142 Surface& surface, | 143 Surface& surface, |
| 143 SurfaceClient client); | 144 SurfaceClient client); |
| 144 | 145 |
| 146 // Returns surface reference back to window server for reclamation. | |
| 147 ReturnSurfaceReference(uint32 window_id, cc.mojom.SurfaceSequence sequence); | |
|
sky
2016/10/14 20:55:46
Can this name be more explicit, maybe something li
Fady Samuel
2016/10/14 21:32:48
None of these are good names though because there
| |
| 148 | |
| 145 // Reparents a window. | 149 // Reparents a window. |
| 146 // This fails for any of the following reasons: | 150 // This fails for any of the following reasons: |
| 147 // . |parent| or |child| does not identify a valid window. | 151 // . |parent| or |child| does not identify a valid window. |
| 148 // . |child| is an ancestor of |parent|. | 152 // . |child| is an ancestor of |parent|. |
| 149 // . |child| is already a child of |parent|. | 153 // . |child| is already a child of |parent|. |
| 150 // | 154 // |
| 151 // This may result in a connection getting OnWindowDeleted(). See | 155 // This may result in a connection getting OnWindowDeleted(). See |
| 152 // RemoveWindowFromParent for details. | 156 // RemoveWindowFromParent for details. |
| 153 AddWindow(uint32 change_id, uint32 parent, uint32 child); | 157 AddWindow(uint32 change_id, uint32 parent, uint32 child); |
| 154 | 158 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 414 | 418 |
| 415 // Called in two distinct cases: when a window known to the connection gains | 419 // Called in two distinct cases: when a window known to the connection gains |
| 416 // focus, or when focus moves from a window known to the connection to a | 420 // focus, or when focus moves from a window known to the connection to a |
| 417 // window not known to the connection. In the later case |focused_window_id| | 421 // window not known to the connection. In the later case |focused_window_id| |
| 418 // is 0. As with other functions this is only called if the client did not | 422 // is 0. As with other functions this is only called if the client did not |
| 419 // initiate the change. | 423 // initiate the change. |
| 420 OnWindowFocused(uint32 focused_window_id); | 424 OnWindowFocused(uint32 focused_window_id); |
| 421 | 425 |
| 422 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); | 426 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); |
| 423 | 427 |
| 428 // Invoked when a client window submits a new surface ID. | |
|
sky
2016/10/14 20:55:46
Please better indicate what the client is expected
Fady Samuel
2016/10/14 21:32:48
Done.
| |
| 429 // TODO(fsamuel): Surface IDs should be passed to parents directly instead of | |
| 430 // going through the window server. http://crbug.com/655231 | |
| 431 OnWindowSurfaceCreated(uint32 window_id, | |
| 432 cc.mojom.SurfaceId surface_id, | |
| 433 cc.mojom.SurfaceSequence surface_sequence, | |
| 434 gfx.mojom.Size frame_size, | |
| 435 float device_scale_factor); | |
| 436 | |
| 424 // Called when the mouse cursor enters a window on this connection for the | 437 // Called when the mouse cursor enters a window on this connection for the |
| 425 // first time, providing a list of available mime types. We want to send this | 438 // first time, providing a list of available mime types. We want to send this |
| 426 // set of data only one time, so this isn't part of OnDragEnter(), which | 439 // set of data only one time, so this isn't part of OnDragEnter(), which |
| 427 // occurs every time the mouse enters a window. | 440 // occurs every time the mouse enters a window. |
| 428 OnDragDropStart(map<string, array<uint8>> drag_data); | 441 OnDragDropStart(map<string, array<uint8>> drag_data); |
| 429 | 442 |
| 430 // Called when the mouse cursor enters a window that has opted into | 443 // Called when the mouse cursor enters a window that has opted into |
| 431 // accepting drags through SetAcceptsDrags(), providing a list | 444 // accepting drags through SetAcceptsDrags(), providing a list |
| 432 // of available mime types. Returns a bitmask of the supported | 445 // of available mime types. Returns a bitmask of the supported |
| 433 // operations. | 446 // operations. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 // See description of WindowManager for details. | 488 // See description of WindowManager for details. |
| 476 GetWindowManager(associated WindowManager& internal); | 489 GetWindowManager(associated WindowManager& internal); |
| 477 }; | 490 }; |
| 478 | 491 |
| 479 // Mus provides this interface as a way for clients to connect and obtain a | 492 // Mus provides this interface as a way for clients to connect and obtain a |
| 480 // WindowTree handle with a supplied WindowTreeClient handle. The | 493 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 481 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 494 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 482 interface WindowTreeFactory { | 495 interface WindowTreeFactory { |
| 483 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 496 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 484 }; | 497 }; |
| OLD | NEW |