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

Side by Side Diff: mojo/services/view_manager/public/interfaces/view_manager.mojom

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 years, 11 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 "../../../geometry/public/interfaces/geometry.mojom";
8 import "../../../input_events/public/interfaces/input_events.mojom";
9 import "../../../native_viewport/public/interfaces/native_viewport.mojom";
10 import "../../../surfaces/public/interfaces/surface_id.mojom";
7 import "mojo/public/interfaces/application/service_provider.mojom"; 11 import "mojo/public/interfaces/application/service_provider.mojom";
8 import "mojo/services/geometry/public/interfaces/geometry.mojom"; 12 import "view_manager_constants.mojom";
9 import "mojo/services/input_events/public/interfaces/input_events.mojom";
10 import "mojo/services/surfaces/public/interfaces/surface_id.mojom";
11 import "mojo/services/view_manager/public/interfaces/view_manager_constants.mojo m";
12 13
13 struct ViewData { 14 struct ViewData {
14 uint32 parent_id; 15 uint32 parent_id;
15 uint32 view_id; 16 uint32 view_id;
16 mojo.Rect bounds; 17 mojo.Rect bounds;
17 map<string, array<uint8>> properties; 18 map<string, array<uint8>> properties;
18 // True if this view is visible. The view may not be drawn on screen (see 19 // True if this view is visible. The view may not be drawn on screen (see
19 // drawn for specifics). 20 // drawn for specifics).
20 bool visible; 21 bool visible;
21 // True if this view is drawn on screen. A view is drawn if attached to the 22 // True if this view is drawn on screen. A view is drawn if attached to the
22 // root and all ancestors (including this view) are visible. 23 // root and all ancestors (including this view) are visible.
23 bool drawn; 24 bool drawn;
25 ViewportMetrics viewport_metrics;
24 }; 26 };
25 27
26 enum ErrorCode { 28 enum ErrorCode {
27 NONE, 29 NONE,
28 VALUE_IN_USE, 30 VALUE_IN_USE,
29 ILLEGAL_ARGUMENT, 31 ILLEGAL_ARGUMENT,
30 }; 32 };
31 33
32 // Views are identified by a uint32. The upper 16 bits are the connection id, 34 // Views are identified by a uint32. The upper 16 bits are the connection id,
33 // and the lower 16 the id assigned by the client. 35 // and the lower 16 the id assigned by the client.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // connection. 125 // connection.
124 // 126 //
125 // |service_provider| encapsulates services offered by the embedder to the 127 // |service_provider| encapsulates services offered by the embedder to the
126 // embedded app alongside this Embed() call. It also provides a means for 128 // embedded app alongside this Embed() call. It also provides a means for
127 // the embedder to connect to services symmetrically exposed by the embedded 129 // the embedder to connect to services symmetrically exposed by the embedded
128 // app. Note that if a different app is subsequently embedded at |view_id| 130 // app. Note that if a different app is subsequently embedded at |view_id|
129 // the |service_provider|'s connection to its client in the embedded app and 131 // the |service_provider|'s connection to its client in the embedded app and
130 // any services it provided are not broken and continue to be valid. 132 // any services it provided are not broken and continue to be valid.
131 Embed(string url, 133 Embed(string url,
132 uint32 view_id, 134 uint32 view_id,
133 ServiceProvider&? service_provider) => (bool success); 135 ServiceProvider& service_provider) => (bool success);
134 }; 136 };
135 137
136 // Changes to views are not sent to the connection that originated the 138 // Changes to views are not sent to the connection that originated the
137 // change. For example, if connection 1 changes the bounds of a view by calling 139 // change. For example, if connection 1 changes the bounds of a view by calling
138 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). 140 // SetBounds(), connection 1 does not receive OnViewBoundsChanged().
139 [Client=ViewManagerService] 141 [Client=ViewManagerService]
140 interface ViewManagerClient { 142 interface ViewManagerClient {
141 // Invoked when the client application has been embedded at |root|. 143 // Invoked when the client application has been embedded at |root|.
142 // See Embed() on ViewManagerService for more details. |window_manager_pipe| 144 // See Embed() on ViewManagerService for more details. |window_manager_pipe|
143 // is a pipe to the WindowManager. 145 // is a pipe to the WindowManager.
144 OnEmbed(uint16 connection_id, 146 OnEmbed(uint16 connection_id,
145 string embedder_url, 147 string embedder_url,
146 ViewData root, 148 ViewData root,
147 ServiceProvider&? parent_service_provider, 149 ServiceProvider& parent_service_provider,
148 handle<message_pipe> window_manager_pipe); 150 handle<message_pipe> window_manager_pipe);
149 151
150 // Invoked when the application embedded at |view| is disconnected. 152 // Invoked when the application embedded at |view| is disconnected.
151 OnEmbeddedAppDisconnected(uint32 view); 153 OnEmbeddedAppDisconnected(uint32 view);
152 154
153 // Invoked when a view's bounds have changed. 155 // Invoked when a view's bounds have changed.
154 OnViewBoundsChanged(uint32 view, 156 OnViewBoundsChanged(uint32 view,
155 mojo.Rect old_bounds, 157 mojo.Rect old_bounds,
156 mojo.Rect new_bounds); 158 mojo.Rect new_bounds);
157 159
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. 191 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked.
190 OnViewDrawnStateChanged(uint32 view, bool drawn); 192 OnViewDrawnStateChanged(uint32 view, bool drawn);
191 193
192 // Invoked when a view property is changed. If this change is a removal, 194 // Invoked when a view property is changed. If this change is a removal,
193 // |new_data| is null. 195 // |new_data| is null.
194 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); 196 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data);
195 197
196 // Invoked when an event is targeted at the specified view. 198 // Invoked when an event is targeted at the specified view.
197 OnViewInputEvent(uint32 view, mojo.Event event) => (); 199 OnViewInputEvent(uint32 view, mojo.Event event) => ();
198 }; 200 };
OLDNEW
« no previous file with comments | « mojo/services/view_manager/public/interfaces/animations.mojom ('k') | mojo/services/window_manager/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698