Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: services/ui/public/interfaces/window_tree.mojom

Issue 2414683003: Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: Don't follow null surface_info Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/public/cpp/window_tree_client.cc ('k') | services/ui/surfaces/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 OnWindowSurfaceDetached(uint32 window_id, cc.mojom.SurfaceSequence sequence);
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
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. The surface ID and
429 // associated information is propagated to the parent connection. The parent
430 // compositor can take ownership of this surface ID and embed it along with
431 // the SurfaceSequence, frame_size, and device_scale_factor in a layer.
432 // TODO(fsamuel): Surface IDs should be passed to parents directly instead of
433 // going through the window server. http://crbug.com/655231
434 OnWindowSurfaceChanged(uint32 window_id,
435 cc.mojom.SurfaceId surface_id,
436 cc.mojom.SurfaceSequence surface_sequence,
437 gfx.mojom.Size frame_size,
438 float device_scale_factor);
439
424 // Called when the mouse cursor enters a window on this connection for the 440 // 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 441 // 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 442 // set of data only one time, so this isn't part of OnDragEnter(), which
427 // occurs every time the mouse enters a window. 443 // occurs every time the mouse enters a window.
428 OnDragDropStart(map<string, array<uint8>> drag_data); 444 OnDragDropStart(map<string, array<uint8>> drag_data);
429 445
430 // Called when the mouse cursor enters a window that has opted into 446 // Called when the mouse cursor enters a window that has opted into
431 // accepting drags through SetAcceptsDrags(), providing a list 447 // accepting drags through SetAcceptsDrags(), providing a list
432 // of available mime types. Returns a bitmask of the supported 448 // of available mime types. Returns a bitmask of the supported
433 // operations. 449 // operations.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // See description of WindowManager for details. 491 // See description of WindowManager for details.
476 GetWindowManager(associated WindowManager& internal); 492 GetWindowManager(associated WindowManager& internal);
477 }; 493 };
478 494
479 // Mus provides this interface as a way for clients to connect and obtain a 495 // Mus provides this interface as a way for clients to connect and obtain a
480 // WindowTree handle with a supplied WindowTreeClient handle. The 496 // WindowTree handle with a supplied WindowTreeClient handle. The
481 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. 497 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one.
482 interface WindowTreeFactory { 498 interface WindowTreeFactory {
483 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); 499 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client);
484 }; 500 };
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_tree_client.cc ('k') | services/ui/surfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698