| 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 "cc/ipc/surface_sequence.mojom"; |
| 9 import "cc/ipc/mojo_compositor_frame_sink.mojom"; | 9 import "cc/ipc/mojo_compositor_frame_sink.mojom"; |
| 10 import "services/ui/public/interfaces/cursor.mojom"; | 10 import "services/ui/public/interfaces/cursor.mojom"; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Sets the opacity of the specified window to |opacity|. | 137 // Sets the opacity of the specified window to |opacity|. |
| 138 SetWindowOpacity(uint32 change_id, uint32 window_id, float opacity); | 138 SetWindowOpacity(uint32 change_id, uint32 window_id, float opacity); |
| 139 | 139 |
| 140 // Attaches a CompositorFrameSink to a particular window. | 140 // Attaches a CompositorFrameSink to a particular window. |
| 141 AttachCompositorFrameSink( | 141 AttachCompositorFrameSink( |
| 142 uint32 window_id, | 142 uint32 window_id, |
| 143 CompositorFrameSinkType type, | 143 CompositorFrameSinkType type, |
| 144 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, | 144 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, |
| 145 cc.mojom.MojoCompositorFrameSinkClient client); | 145 cc.mojom.MojoCompositorFrameSinkClient client); |
| 146 | 146 |
| 147 // Returns surface reference back to window server for reclamation. | |
| 148 OnWindowSurfaceDetached(uint32 window_id, cc.mojom.SurfaceSequence sequence); | |
| 149 | |
| 150 // Reparents a window. | 147 // Reparents a window. |
| 151 // This fails for any of the following reasons: | 148 // This fails for any of the following reasons: |
| 152 // . |parent| or |child| does not identify a valid window. | 149 // . |parent| or |child| does not identify a valid window. |
| 153 // . |child| is an ancestor of |parent|. | 150 // . |child| is an ancestor of |parent|. |
| 154 // . |child| is already a child of |parent|. | 151 // . |child| is already a child of |parent|. |
| 155 // | 152 // |
| 156 // This may result in a connection getting OnWindowDeleted(). See | 153 // This may result in a connection getting OnWindowDeleted(). See |
| 157 // RemoveWindowFromParent for details. | 154 // RemoveWindowFromParent for details. |
| 158 AddWindow(uint32 change_id, uint32 parent, uint32 child); | 155 AddWindow(uint32 change_id, uint32 parent, uint32 child); |
| 159 | 156 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // window not known to the connection. In the later case |focused_window_id| | 423 // window not known to the connection. In the later case |focused_window_id| |
| 427 // is 0. As with other functions this is only called if the client did not | 424 // is 0. As with other functions this is only called if the client did not |
| 428 // initiate the change. | 425 // initiate the change. |
| 429 OnWindowFocused(uint32 focused_window_id); | 426 OnWindowFocused(uint32 focused_window_id); |
| 430 | 427 |
| 431 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); | 428 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); |
| 432 | 429 |
| 433 // Invoked when a client window submits a new surface ID. The surface ID and | 430 // Invoked when a client window submits a new surface ID. The surface ID and |
| 434 // associated information is propagated to the parent connection. The parent | 431 // associated information is propagated to the parent connection. The parent |
| 435 // compositor can take ownership of this surface ID and embed it along with | 432 // compositor can take ownership of this surface ID and embed it along with |
| 436 // the SurfaceSequence, frame_size, and device_scale_factor in a layer. | 433 // frame_size and device_scale_factor in a layer. |
| 437 // TODO(fsamuel): Surface IDs should be passed to parents directly instead of | 434 // TODO(fsamuel): Surface IDs should be passed to parents directly instead of |
| 438 // going through the window server. http://crbug.com/655231 | 435 // going through the window server. http://crbug.com/655231 |
| 439 OnWindowSurfaceChanged(uint32 window_id, | 436 OnWindowSurfaceChanged(uint32 window_id, |
| 440 cc.mojom.SurfaceId surface_id, | 437 cc.mojom.SurfaceId surface_id, |
| 441 cc.mojom.SurfaceSequence surface_sequence, | |
| 442 gfx.mojom.Size frame_size, | 438 gfx.mojom.Size frame_size, |
| 443 float device_scale_factor); | 439 float device_scale_factor); |
| 444 | 440 |
| 445 // Called when the mouse cursor enters a window on this connection for the | 441 // Called when the mouse cursor enters a window on this connection for the |
| 446 // first time, providing a list of available mime types. We want to send this | 442 // first time, providing a list of available mime types. We want to send this |
| 447 // set of data only one time, so this isn't part of OnDragEnter(), which | 443 // set of data only one time, so this isn't part of OnDragEnter(), which |
| 448 // occurs every time the mouse enters a window. | 444 // occurs every time the mouse enters a window. |
| 449 OnDragDropStart(map<string, array<uint8>> drag_data); | 445 OnDragDropStart(map<string, array<uint8>> drag_data); |
| 450 | 446 |
| 451 // Called when the mouse cursor enters a window that has opted into | 447 // Called when the mouse cursor enters a window that has opted into |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // See description of WindowManager for details. | 492 // See description of WindowManager for details. |
| 497 GetWindowManager(associated WindowManager& internal); | 493 GetWindowManager(associated WindowManager& internal); |
| 498 }; | 494 }; |
| 499 | 495 |
| 500 // Mus provides this interface as a way for clients to connect and obtain a | 496 // Mus provides this interface as a way for clients to connect and obtain a |
| 501 // WindowTree handle with a supplied WindowTreeClient handle. The | 497 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 502 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 498 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 503 interface WindowTreeFactory { | 499 interface WindowTreeFactory { |
| 504 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 500 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 505 }; | 501 }; |
| OLD | NEW |