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

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: Rebased 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 14 matching lines...) Expand all
31 bool drawn; 32 bool drawn;
32 ViewportMetrics viewport_metrics; 33 ViewportMetrics viewport_metrics;
33 }; 34 };
34 35
35 enum ErrorCode { 36 enum ErrorCode {
36 NONE, 37 NONE,
37 VALUE_IN_USE, 38 VALUE_IN_USE,
38 ILLEGAL_ARGUMENT, 39 ILLEGAL_ARGUMENT,
39 }; 40 };
40 41
42 interface CompositorFrameReceiver {
rjkroege 2015/08/13 18:04:01 why didn't you put this with the compositor_frame?
Fady Samuel 2015/08/17 21:11:11 Moved
43 // After the submitted frame is drawn for the first time, the surface will
44 // respond to the SubmitFrame message. Clients should use this acknowledgement
45 // to ratelimit frame submissions.
46 SubmitFrame(CompositorFrame frame) => ();
47 };
48
41 // Views are identified by a uint32. The upper 16 bits are the connection id, 49 // Views are identified by a uint32. The upper 16 bits are the connection id,
42 // and the lower 16 the id assigned by the client. 50 // and the lower 16 the id assigned by the client.
43 // 51 //
44 // The root view is identified with a connection id of 0, and value of 1. 52 // The root view is identified with a connection id of 0, and value of 1.
45 interface ViewManagerService { 53 interface ViewManagerService {
46 // Creates a new view with the specified id. It is up to the client to ensure 54 // Creates a new view with the specified id. It is up to the client to ensure
47 // the id is unique to the connection (the id need not be globally unique). 55 // the id is unique to the connection (the id need not be globally unique).
48 // Additionally the connection id (embedded in |view_id|) must match that of 56 // Additionally the connection id (embedded in |view_id|) must match that of
49 // the connection. 57 // the connection.
50 // Errors: 58 // Errors:
(...skipping 17 matching lines...) Expand all
68 // allowed to change the visibility of any view they have created, as well as 76 // allowed to change the visibility of any view they have created, as well as
69 // any of their roots. 77 // any of their roots.
70 SetViewVisibility(uint32 view_id, bool visible) => (bool success); 78 SetViewVisibility(uint32 view_id, bool visible) => (bool success);
71 79
72 // Sets an individual named property. Setting an individual property to null 80 // Sets an individual named property. Setting an individual property to null
73 // deletes the property. 81 // deletes the property.
74 SetViewProperty(uint32 view_id, 82 SetViewProperty(uint32 view_id,
75 string name, 83 string name,
76 array<uint8>? value) => (bool success); 84 array<uint8>? value) => (bool success);
77 85
86 // Sets the CompositorFrameReceiver on a particular view.
87 RequestCompositorFrameReceiver(uint32 view_id,
88 CompositorFrameReceiver& receiver);
89
78 // Reparents a view. 90 // Reparents a view.
79 // This fails for any of the following reasons: 91 // This fails for any of the following reasons:
80 // . |parent| or |child| does not identify a valid view. 92 // . |parent| or |child| does not identify a valid view.
81 // . |child| is an ancestor of |parent|. 93 // . |child| is an ancestor of |parent|.
82 // . |child| is already a child of |parent|. 94 // . |child| is already a child of |parent|.
83 // 95 //
84 // This may result in a connection getting OnViewDeleted(). See 96 // This may result in a connection getting OnViewDeleted(). See
85 // RemoveViewFromParent for details. 97 // RemoveViewFromParent for details.
86 AddView(uint32 parent, uint32 child) => (bool success); 98 AddView(uint32 parent, uint32 child) => (bool success);
87 99
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 250
239 // Invoked when a view property is changed. If this change is a removal, 251 // Invoked when a view property is changed. If this change is a removal,
240 // |new_data| is null. 252 // |new_data| is null.
241 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); 253 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data);
242 254
243 // Invoked when an event is targeted at the specified view. 255 // Invoked when an event is targeted at the specified view.
244 OnViewInputEvent(uint32 view, mojo.Event event) => (); 256 OnViewInputEvent(uint32 view, mojo.Event event) => ();
245 257
246 OnViewFocused(uint32 focused_view_id); 258 OnViewFocused(uint32 focused_view_id);
247 }; 259 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698