| 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 import "mojo/public/interfaces/application/service_provider.mojom" | 5 import "mojo/public/interfaces/application/service_provider.mojom" |
| 6 import "mojo/services/public/interfaces/geometry/geometry.mojom" | 6 import "mojo/services/public/interfaces/geometry/geometry.mojom" |
| 7 import "mojo/services/public/interfaces/input_events/input_events.mojom" | 7 import "mojo/services/public/interfaces/input_events/input_events.mojom" |
| 8 import "mojo/services/public/interfaces/surfaces/surface_id.mojom" | 8 import "mojo/services/public/interfaces/surfaces/surface_id.mojom" |
| 9 import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojo
m" | 9 import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojo
m" |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // | 130 // |
| 131 // |service_provider| encapsulates services offered by the embedder to the | 131 // |service_provider| encapsulates services offered by the embedder to the |
| 132 // embedded app alongside this Embed() call. It also provides a means for | 132 // embedded app alongside this Embed() call. It also provides a means for |
| 133 // the embedder to connect to services symmetrically exposed by the embedded | 133 // the embedder to connect to services symmetrically exposed by the embedded |
| 134 // app. Note that if a different app is subsequently embedded at |view_id| | 134 // app. Note that if a different app is subsequently embedded at |view_id| |
| 135 // the |service_provider|'s connection to its client in the embedded app and | 135 // the |service_provider|'s connection to its client in the embedded app and |
| 136 // any services it provided are not broken and continue to be valid. | 136 // any services it provided are not broken and continue to be valid. |
| 137 Embed(string url, | 137 Embed(string url, |
| 138 uint32 view_id, | 138 uint32 view_id, |
| 139 ServiceProvider? service_provider) => (bool success); | 139 ServiceProvider? service_provider) => (bool success); |
| 140 | |
| 141 // TODO(sky): move these to a separate interface when FIFO works. | |
| 142 | |
| 143 // Sends OnViewInputEvent() to the owner of the specified view. | |
| 144 DispatchOnViewInputEvent(uint32 view_id, mojo.Event event); | |
| 145 }; | 140 }; |
| 146 | 141 |
| 147 // Changes to views are not sent to the connection that originated the | 142 // Changes to views are not sent to the connection that originated the |
| 148 // change. For example, if connection 1 changes the bounds of a view by calling | 143 // change. For example, if connection 1 changes the bounds of a view by calling |
| 149 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). | 144 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). |
| 150 [Client=ViewManagerService] | 145 [Client=ViewManagerService] |
| 151 interface ViewManagerClient { | 146 interface ViewManagerClient { |
| 152 // Invoked when the client application has been embedded at |root|. | 147 // Invoked when the client application has been embedded at |root|. |
| 153 // See Embed() on ViewManagerService for more details. | 148 // See Embed() on ViewManagerService for more details. |
| 154 OnEmbed(uint16 connection_id, | 149 OnEmbed(uint16 connection_id, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // are from connection 2 and A from connection 1 with all views visible and | 185 // are from connection 2 and A from connection 1 with all views visible and |
| 191 // drawn and the visiblity of A changes to false, then connection 2 is told | 186 // drawn and the visiblity of A changes to false, then connection 2 is told |
| 192 // the drawn state of B1 has changed (to false), but is not told anything | 187 // the drawn state of B1 has changed (to false), but is not told anything |
| 193 // about B2 as it's drawn state can be calculated from that of B1. | 188 // about B2 as it's drawn state can be calculated from that of B1. |
| 194 // | 189 // |
| 195 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. | 190 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. |
| 196 OnViewDrawnStateChanged(uint32 view, bool drawn); | 191 OnViewDrawnStateChanged(uint32 view, bool drawn); |
| 197 | 192 |
| 198 // Invoked when an event is targeted at the specified view. | 193 // Invoked when an event is targeted at the specified view. |
| 199 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 194 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
| 200 | |
| 201 // TODO(sky): The following methods represent an interface between the view | |
| 202 // manager and the application embedded at the service root view | |
| 203 // (i.e. the window manager). These methods are not called on | |
| 204 // any other clients. They should be moved to a separate interface | |
| 205 // once support for derived FIFOs is landed. | |
| 206 | |
| 207 // Requests the window manager create a "top level" view embedding |url|. | |
| 208 Embed(string url, ServiceProvider&? service_provider); | |
| 209 | |
| 210 // Requests the view manager dispatch the event. | |
| 211 DispatchOnViewInputEvent(mojo.Event event); | |
| 212 }; | 195 }; |
| 213 | 196 |
| 214 } | 197 } |
| OLD | NEW |