Chromium Code Reviews| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 // app alongside this Embed() call. |exposed_services| provides a means for | 135 // app alongside this Embed() call. |exposed_services| provides a means for |
| 136 // the embedder to connect to services exposed by the embedded app. Note that | 136 // the embedder to connect to services exposed by the embedded app. Note that |
| 137 // if a different app is subsequently embedded at |view_id| the | 137 // if a different app is subsequently embedded at |view_id| the |
| 138 // ServiceProvider connections to its client in the embedded app and any | 138 // ServiceProvider connections to its client in the embedded app and any |
| 139 // services it provided are not broken and continue to be valid. | 139 // services it provided are not broken and continue to be valid. |
| 140 EmbedUrl(string url, | 140 EmbedUrl(string url, |
| 141 uint32 view_id, | 141 uint32 view_id, |
| 142 ServiceProvider&? services, | 142 ServiceProvider&? services, |
| 143 ServiceProvider? exposed_services) => (bool success); | 143 ServiceProvider? exposed_services) => (bool success); |
| 144 Embed(uint32 view_id, ViewManagerClient client) => (bool success); | 144 Embed(uint32 view_id, ViewManagerClient client) => (bool success); |
| 145 | |
| 146 // Requests the WindowManager to perform an action on the specified view. | |
| 147 // It's up to the WindowManager to decide what |action| is. | |
| 148 // | |
| 149 // TODO(sky): nuke this. This is here to guarantee the state of the | |
| 150 // WindowManager matches that of the ViewManager at the time the client | |
| 151 // invokes the function. When we can enforce ordering this won't be necessary. | |
| 152 PerformAction(uint32 view_id, string action) => (bool success); | |
| 145 }; | 153 }; |
| 146 | 154 |
| 147 // Changes to views are not sent to the connection that originated the | 155 // 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 | 156 // change. For example, if connection 1 changes the bounds of a view by calling |
| 149 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). | 157 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). |
| 150 interface ViewManagerClient { | 158 interface ViewManagerClient { |
| 151 // Invoked when the client application has been embedded at |root|. | 159 // Invoked when the client application has been embedded at |root|. |
| 152 // See Embed() on ViewManagerService for more details. |view_manager_service| | 160 // See Embed() on ViewManagerService for more details. |view_manager_service| |
| 153 // will be a handle back to the view manager service, unless the connection is | 161 // will be a handle back to the view manager service, unless the connection is |
| 154 // to the WindowManager in which case it will be null. | 162 // to the WindowManager in which case it will be null. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 // | 215 // |
| 208 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. | 216 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. |
| 209 OnViewDrawnStateChanged(uint32 view, bool drawn); | 217 OnViewDrawnStateChanged(uint32 view, bool drawn); |
| 210 | 218 |
| 211 // Invoked when a view property is changed. If this change is a removal, | 219 // Invoked when a view property is changed. If this change is a removal, |
| 212 // |new_data| is null. | 220 // |new_data| is null. |
| 213 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); | 221 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); |
| 214 | 222 |
| 215 // Invoked when an event is targeted at the specified view. | 223 // Invoked when an event is targeted at the specified view. |
| 216 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 224 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
| 225 | |
| 226 // Invoked solely on the windowmanager. See comments in PerformAction() above | |
|
msw
2015/02/25 22:29:30
nit: "window manager" or "WindowManager"?
sky
2015/02/25 23:20:27
Done.
| |
| 227 // for details. | |
| 228 // TODO(sky): nuke this. | |
| 229 OnPerformAction(uint32 view_id, string action); | |
| 217 }; | 230 }; |
| OLD | NEW |