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

Side by Side Diff: components/view_manager/public/interfaces/view_manager.mojom

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added plumbing for returning resources Created 5 years, 4 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 mojo; 5 module mojo;
6 6
7 import "components/view_manager/public/interfaces/compositor_frame.mojom";
7 import "components/view_manager/public/interfaces/surface_id.mojom"; 8 import "components/view_manager/public/interfaces/surface_id.mojom";
8 import "components/view_manager/public/interfaces/view_manager_constants.mojom"; 9 import "components/view_manager/public/interfaces/view_manager_constants.mojom";
9 import "mojo/application/public/interfaces/service_provider.mojom"; 10 import "mojo/application/public/interfaces/service_provider.mojom";
10 import "network/public/interfaces/url_loader.mojom"; 11 import "network/public/interfaces/url_loader.mojom";
11 import "ui/mojo/events/input_events.mojom"; 12 import "ui/mojo/events/input_events.mojom";
12 import "ui/mojo/ime/text_input_state.mojom"; 13 import "ui/mojo/ime/text_input_state.mojom";
13 import "ui/mojo/geometry/geometry.mojom"; 14 import "ui/mojo/geometry/geometry.mojom";
14 15
15 struct ViewportMetrics { 16 struct ViewportMetrics {
16 Size size_in_pixels; 17 Size size_in_pixels;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // allowed to change the visibility of any view they have created, as well as 69 // allowed to change the visibility of any view they have created, as well as
69 // any of their roots. 70 // any of their roots.
70 SetViewVisibility(uint32 view_id, bool visible) => (bool success); 71 SetViewVisibility(uint32 view_id, bool visible) => (bool success);
71 72
72 // Sets an individual named property. Setting an individual property to null 73 // Sets an individual named property. Setting an individual property to null
73 // deletes the property. 74 // deletes the property.
74 SetViewProperty(uint32 view_id, 75 SetViewProperty(uint32 view_id,
75 string name, 76 string name,
76 array<uint8>? value) => (bool success); 77 array<uint8>? value) => (bool success);
77 78
79 // Sets the CompositorFrameReceiver on a particular view.
80 RequestCompositorFrameReceiver(uint32 view_id,
81 CompositorFrameReceiver& receiver);
82
78 // Reparents a view. 83 // Reparents a view.
79 // This fails for any of the following reasons: 84 // This fails for any of the following reasons:
80 // . |parent| or |child| does not identify a valid view. 85 // . |parent| or |child| does not identify a valid view.
81 // . |child| is an ancestor of |parent|. 86 // . |child| is an ancestor of |parent|.
82 // . |child| is already a child of |parent|. 87 // . |child| is already a child of |parent|.
83 // 88 //
84 // This may result in a connection getting OnViewDeleted(). See 89 // This may result in a connection getting OnViewDeleted(). See
85 // RemoveViewFromParent for details. 90 // RemoveViewFromParent for details.
86 AddView(uint32 parent, uint32 child) => (bool success); 91 AddView(uint32 parent, uint32 child) => (bool success);
87 92
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 OnEmbedForDescendant(uint32 view, URLRequest request) => 190 OnEmbedForDescendant(uint32 view, URLRequest request) =>
186 (ViewManagerClient? client); 191 (ViewManagerClient? client);
187 192
188 // Invoked when the application embedded at |view| is disconnected. 193 // Invoked when the application embedded at |view| is disconnected.
189 OnEmbeddedAppDisconnected(uint32 view); 194 OnEmbeddedAppDisconnected(uint32 view);
190 195
191 // Sent when another connection is embedded in the View this connection was 196 // Sent when another connection is embedded in the View this connection was
192 // previously embedded in. See Embed() for more information. 197 // previously embedded in. See Embed() for more information.
193 OnUnembed(); 198 OnUnembed();
194 199
200 // Sent when GPU resources are returned to the client for reuse.
rjkroege 2015/08/21 22:58:00 These messages need to end up at cc. in Phase2, t
Fady Samuel 2015/08/21 23:15:27 Yes, I agree. Do you want me to change this in a s
201 OnResourcesReturned(array<ReturnedResource> resources);
202
195 // Invoked when a view's bounds have changed. 203 // Invoked when a view's bounds have changed.
196 OnViewBoundsChanged(uint32 view, 204 OnViewBoundsChanged(uint32 view,
197 mojo.Rect old_bounds, 205 mojo.Rect old_bounds,
198 mojo.Rect new_bounds); 206 mojo.Rect new_bounds);
199 207
200 // Invoked when the viewport metrics for the view have changed. 208 // Invoked when the viewport metrics for the view have changed.
201 // Clients are expected to propagate this to the view tree. 209 // Clients are expected to propagate this to the view tree.
202 OnViewViewportMetricsChanged(mojo.ViewportMetrics old_metrics, 210 OnViewViewportMetricsChanged(mojo.ViewportMetrics old_metrics,
203 mojo.ViewportMetrics new_metrics); 211 mojo.ViewportMetrics new_metrics);
204 212
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 246
239 // Invoked when a view property is changed. If this change is a removal, 247 // Invoked when a view property is changed. If this change is a removal,
240 // |new_data| is null. 248 // |new_data| is null.
241 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); 249 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data);
242 250
243 // Invoked when an event is targeted at the specified view. 251 // Invoked when an event is targeted at the specified view.
244 OnViewInputEvent(uint32 view, mojo.Event event) => (); 252 OnViewInputEvent(uint32 view, mojo.Event event) => ();
245 253
246 OnViewFocused(uint32 focused_view_id); 254 OnViewFocused(uint32 focused_view_id);
247 }; 255 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698