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

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

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 10 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
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/local_frame_id.mojom";
7 import "cc/ipc/surface_info.mojom"; 8 import "cc/ipc/surface_info.mojom";
8 import "cc/ipc/mojo_compositor_frame_sink.mojom"; 9 import "cc/ipc/mojo_compositor_frame_sink.mojom";
9 import "services/ui/public/interfaces/cursor.mojom"; 10 import "services/ui/public/interfaces/cursor.mojom";
10 import "services/ui/public/interfaces/event_matcher.mojom"; 11 import "services/ui/public/interfaces/event_matcher.mojom";
11 import "services/ui/public/interfaces/mus_constants.mojom"; 12 import "services/ui/public/interfaces/mus_constants.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";
(...skipping 29 matching lines...) Expand all
46 // Creates a new window with the specified id. It is up to the client to 47 // Creates a new window with the specified id. It is up to the client to
47 // ensure the id is unique to the connection (the id need not be globally 48 // ensure the id is unique to the connection (the id need not be globally
48 // unique). Additionally the connection id (embedded in |window_id|) must 49 // unique). Additionally the connection id (embedded in |window_id|) must
49 // match that of the connection. 50 // match that of the connection.
50 // Errors: 51 // Errors:
51 // ERROR_CODE_VALUE_IN_USE: a window already exists with the specified id. 52 // ERROR_CODE_VALUE_IN_USE: a window already exists with the specified id.
52 // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |window_id| does not 53 // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |window_id| does not
53 // match the connection id of the client. 54 // match the connection id of the client.
54 NewWindow(uint32 change_id, 55 NewWindow(uint32 change_id,
55 uint32 window_id, 56 uint32 window_id,
56 map<string, array<uint8>>? properties); 57 map<string, array<uint8>>? properties,
58 cc.mojom.LocalFrameId local_frame_id);
57 59
58 // Requests the WindowManager to create a new top level window. On success 60 // Requests the WindowManager to create a new top level window. On success
59 // OnTopLevelCreated() is called with the WindowData for the new window. On 61 // OnTopLevelCreated() is called with the WindowData for the new window. On
60 // failure OnChangeCompleted() is called. 62 // failure OnChangeCompleted() is called.
61 // TODO(sky): this likely needs context, maybe in |properties|. 63 // TODO(sky): this likely needs context, maybe in |properties|.
62 NewTopLevelWindow(uint32 change_id, 64 NewTopLevelWindow(uint32 change_id,
63 uint32 window_id, 65 uint32 window_id,
64 map<string, array<uint8>> properties); 66 map<string, array<uint8>> properties);
65 67
66 // Deletes a window. This does not recurse. No hierarchy change notifications 68 // Deletes a window. This does not recurse. No hierarchy change notifications
(...skipping 26 matching lines...) Expand all
93 // OnPointerEventObserved(). There is only ever one pointer watcher active at 95 // OnPointerEventObserved(). There is only ever one pointer watcher active at
94 // a given time. The client should prefer |want_moves| to be false, as there's 96 // a given time. The client should prefer |want_moves| to be false, as there's
95 // a system-wide performance/battery penalty for listening to moves. 97 // a system-wide performance/battery penalty for listening to moves.
96 // 98 //
97 // See class description for details on event delivery. 99 // See class description for details on event delivery.
98 StartPointerWatcher(bool want_moves); 100 StartPointerWatcher(bool want_moves);
99 101
100 // Stops the pointer watcher for all events. 102 // Stops the pointer watcher for all events.
101 StopPointerWatcher(); 103 StopPointerWatcher();
102 104
103 // Sets the specified bounds of the specified window. 105 // Sets the specified bounds of the specified window. The window will paint
104 SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds); 106 // the frame in the provided |local_frame_id|.
107 SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds,
108 cc.mojom.LocalFrameId local_frame_id);
105 109
106 // Sets the client area of the specified window. The client area is specified 110 // Sets the client area of the specified window. The client area is specified
107 // by way of insets. Everything outside of the insets, and not in 111 // by way of insets. Everything outside of the insets, and not in
108 // |additional_client_areas| is considered non-client area. 112 // |additional_client_areas| is considered non-client area.
109 // TODO(sky): convert additional_client_areas to a path. 113 // TODO(sky): convert additional_client_areas to a path.
110 SetClientArea(uint32 window_id, 114 SetClientArea(uint32 window_id,
111 gfx.mojom.Insets insets, 115 gfx.mojom.Insets insets,
112 array<gfx.mojom.Rect>? additional_client_areas); 116 array<gfx.mojom.Rect>? additional_client_areas);
113 117
114 // Mouse events outside a hit test mask do not hit the window. The |mask| is 118 // Mouse events outside a hit test mask do not hit the window. The |mask| is
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // OnDrawnStateChanged() for details. |display_id| identifies the display this 341 // OnDrawnStateChanged() for details. |display_id| identifies the display this
338 // window is on. 342 // window is on.
339 OnTopLevelCreated(uint32 change_id, 343 OnTopLevelCreated(uint32 change_id,
340 WindowData data, 344 WindowData data,
341 int64 display_id, 345 int64 display_id,
342 bool parent_drawn); 346 bool parent_drawn);
343 347
344 // Invoked when a window's bounds have changed. 348 // Invoked when a window's bounds have changed.
345 OnWindowBoundsChanged(uint32 window, 349 OnWindowBoundsChanged(uint32 window,
346 gfx.mojom.Rect old_bounds, 350 gfx.mojom.Rect old_bounds,
347 gfx.mojom.Rect new_bounds); 351 gfx.mojom.Rect new_bounds,
352 cc.mojom.LocalFrameId local_frame_id);
348 353
349 OnClientAreaChanged(uint32 window_id, 354 OnClientAreaChanged(uint32 window_id,
350 gfx.mojom.Insets new_client_area, 355 gfx.mojom.Insets new_client_area,
351 array<gfx.mojom.Rect> new_additional_client_areas); 356 array<gfx.mojom.Rect> new_additional_client_areas);
352 357
353 OnTransientWindowAdded(uint32 window_id, 358 OnTransientWindowAdded(uint32 window_id,
354 uint32 transient_window_id); 359 uint32 transient_window_id);
355 360
356 OnTransientWindowRemoved(uint32 window_id, 361 OnTransientWindowRemoved(uint32 window_id,
357 uint32 transient_window_id); 362 uint32 transient_window_id);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // See description of WindowManager for details. 500 // See description of WindowManager for details.
496 GetWindowManager(associated WindowManager& internal); 501 GetWindowManager(associated WindowManager& internal);
497 }; 502 };
498 503
499 // Mus provides this interface as a way for clients to connect and obtain a 504 // Mus provides this interface as a way for clients to connect and obtain a
500 // WindowTree handle with a supplied WindowTreeClient handle. The 505 // WindowTree handle with a supplied WindowTreeClient handle. The
501 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. 506 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one.
502 interface WindowTreeFactory { 507 interface WindowTreeFactory {
503 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); 508 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client);
504 }; 509 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698