OLD | NEW |
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"; | 7 import "geometry/public/interfaces/geometry.mojom"; |
8 import "input_events/public/interfaces/input_events.mojom"; | 8 import "input_events/public/interfaces/input_events.mojom"; |
9 import "mojo/public/interfaces/application/service_provider.mojom"; | 9 import "mojo/public/interfaces/application/service_provider.mojom"; |
10 import "native_viewport/public/interfaces/native_viewport.mojom"; | 10 import "native_viewport/public/interfaces/native_viewport.mojom"; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // OnViewDeleted(). | 117 // OnViewDeleted(). |
118 // | 118 // |
119 // The embedder can detect when the embedded app disconnects by way of | 119 // The embedder can detect when the embedded app disconnects by way of |
120 // OnEmbeddedAppDisconnected(). | 120 // OnEmbeddedAppDisconnected(). |
121 // | 121 // |
122 // When a connection embeds an app the connection no longer has priviledges | 122 // When a connection embeds an app the connection no longer has priviledges |
123 // to access or see any of the children of the view. If the view had existing | 123 // to access or see any of the children of the view. If the view had existing |
124 // children the children are removed. The one exception is the root | 124 // children the children are removed. The one exception is the root |
125 // connection. | 125 // connection. |
126 // | 126 // |
127 // |service_provider| encapsulates services offered by the embedder to the | 127 // |services| encapsulates services offered by the embedder to the embedded |
128 // embedded app alongside this Embed() call. It also provides a means for | 128 // app alongside this Embed() call. |exposed_services| provides a means for |
129 // the embedder to connect to services symmetrically exposed by the embedded | 129 // the embedder to connect to services exposed by the embedded app. Note that |
130 // app. Note that if a different app is subsequently embedded at |view_id| | 130 // if a different app is subsequently embedded at |view_id| the |
131 // the |service_provider|'s connection to its client in the embedded app and | 131 // ServiceProvider connections to its client in the embedded app and any |
132 // any services it provided are not broken and continue to be valid. | 132 // services it provided are not broken and continue to be valid. |
133 Embed(string url, | 133 Embed(string url, |
134 uint32 view_id, | 134 uint32 view_id, |
135 ServiceProvider& service_provider) => (bool success); | 135 ServiceProvider&? services, |
| 136 ServiceProvider? exposed_services) => (bool success); |
136 }; | 137 }; |
137 | 138 |
138 // Changes to views are not sent to the connection that originated the | 139 // Changes to views are not sent to the connection that originated the |
139 // change. For example, if connection 1 changes the bounds of a view by calling | 140 // change. For example, if connection 1 changes the bounds of a view by calling |
140 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). | 141 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). |
141 [Client=ViewManagerService] | 142 [Client=ViewManagerService] |
142 interface ViewManagerClient { | 143 interface ViewManagerClient { |
143 // Invoked when the client application has been embedded at |root|. | 144 // Invoked when the client application has been embedded at |root|. |
144 // See Embed() on ViewManagerService for more details. |window_manager_pipe| | 145 // See Embed() on ViewManagerService for more details. |window_manager_pipe| |
145 // is a pipe to the WindowManager. | 146 // is a pipe to the WindowManager. |
146 OnEmbed(uint16 connection_id, | 147 OnEmbed(uint16 connection_id, |
147 string embedder_url, | 148 string embedder_url, |
148 ViewData root, | 149 ViewData root, |
149 ServiceProvider& parent_service_provider, | 150 ServiceProvider&? services, |
| 151 ServiceProvider? exposed_services, |
150 handle<message_pipe> window_manager_pipe); | 152 handle<message_pipe> window_manager_pipe); |
151 | 153 |
152 // Invoked when the application embedded at |view| is disconnected. | 154 // Invoked when the application embedded at |view| is disconnected. |
153 OnEmbeddedAppDisconnected(uint32 view); | 155 OnEmbeddedAppDisconnected(uint32 view); |
154 | 156 |
155 // Invoked when a view's bounds have changed. | 157 // Invoked when a view's bounds have changed. |
156 OnViewBoundsChanged(uint32 view, | 158 OnViewBoundsChanged(uint32 view, |
157 mojo.Rect old_bounds, | 159 mojo.Rect old_bounds, |
158 mojo.Rect new_bounds); | 160 mojo.Rect new_bounds); |
159 | 161 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. | 193 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. |
192 OnViewDrawnStateChanged(uint32 view, bool drawn); | 194 OnViewDrawnStateChanged(uint32 view, bool drawn); |
193 | 195 |
194 // Invoked when a view property is changed. If this change is a removal, | 196 // Invoked when a view property is changed. If this change is a removal, |
195 // |new_data| is null. | 197 // |new_data| is null. |
196 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); | 198 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); |
197 | 199 |
198 // Invoked when an event is targeted at the specified view. | 200 // Invoked when an event is targeted at the specified view. |
199 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 201 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
200 }; | 202 }; |
OLD | NEW |