| 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 "components/mus/public/interfaces/compositor_frame.mojom"; | 7 import "components/mus/public/interfaces/compositor_frame.mojom"; |
| 8 import "components/mus/public/interfaces/surface_id.mojom"; | 8 import "components/mus/public/interfaces/surface_id.mojom"; |
| 9 import "components/mus/public/interfaces/mus_constants.mojom"; | 9 import "components/mus/public/interfaces/mus_constants.mojom"; |
| 10 import "mojo/application/public/interfaces/service_provider.mojom"; | 10 import "mojo/application/public/interfaces/service_provider.mojom"; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // | 68 // |
| 69 // TODO(erg): Once we have default values in mojo, make this take a map of | 69 // TODO(erg): Once we have default values in mojo, make this take a map of |
| 70 // properties. | 70 // properties. |
| 71 CreateView(uint32 view_id) => (ErrorCode error_code); | 71 CreateView(uint32 view_id) => (ErrorCode error_code); |
| 72 | 72 |
| 73 // Deletes a view. This does not recurse. No hierarchy change notifications | 73 // Deletes a view. This does not recurse. No hierarchy change notifications |
| 74 // are sent as a result of this. Only the connection that created the view can | 74 // are sent as a result of this. Only the connection that created the view can |
| 75 // delete it. | 75 // delete it. |
| 76 DeleteView(uint32 view_id) => (bool success); | 76 DeleteView(uint32 view_id) => (bool success); |
| 77 | 77 |
| 78 SetCapture(uint32 view_id) => (bool success); |
| 79 |
| 78 // Sets the specified bounds of the specified view. | 80 // Sets the specified bounds of the specified view. |
| 79 SetViewBounds(uint32 view_id, mojo.Rect bounds) => (bool success); | 81 SetViewBounds(uint32 view_id, mojo.Rect bounds) => (bool success); |
| 80 | 82 |
| 81 // Sets the visibility of the specified view to |visible|. Connections are | 83 // Sets the visibility of the specified view to |visible|. Connections are |
| 82 // allowed to change the visibility of any view they have created, as well as | 84 // allowed to change the visibility of any view they have created, as well as |
| 83 // any of their roots. | 85 // any of their roots. |
| 84 SetViewVisibility(uint32 view_id, bool visible) => (bool success); | 86 SetViewVisibility(uint32 view_id, bool visible) => (bool success); |
| 85 | 87 |
| 86 // Sets an individual named property. Setting an individual property to null | 88 // Sets an individual named property. Setting an individual property to null |
| 87 // deletes the property. | 89 // deletes the property. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // Invoked when the application embedded at |view| is disconnected. In other | 190 // Invoked when the application embedded at |view| is disconnected. In other |
| 189 // words the embedded app closes the connection to the server. This is called | 191 // words the embedded app closes the connection to the server. This is called |
| 190 // on the connection that created |view| as well as any ancestors that have | 192 // on the connection that created |view| as well as any ancestors that have |
| 191 // the embed root policy. | 193 // the embed root policy. |
| 192 OnEmbeddedAppDisconnected(uint32 view); | 194 OnEmbeddedAppDisconnected(uint32 view); |
| 193 | 195 |
| 194 // Sent when another connection is embedded in the View this connection was | 196 // Sent when another connection is embedded in the View this connection was |
| 195 // previously embedded in. See Embed() for more information. | 197 // previously embedded in. See Embed() for more information. |
| 196 OnUnembed(); | 198 OnUnembed(); |
| 197 | 199 |
| 200 // Sent when a view loses capture. |
| 201 OnLostCapture(uint32 view); |
| 202 |
| 198 // Invoked when a view's bounds have changed. | 203 // Invoked when a view's bounds have changed. |
| 199 OnViewBoundsChanged(uint32 view, | 204 OnViewBoundsChanged(uint32 view, |
| 200 mojo.Rect old_bounds, | 205 mojo.Rect old_bounds, |
| 201 mojo.Rect new_bounds); | 206 mojo.Rect new_bounds); |
| 202 | 207 |
| 203 // Invoked when the viewport metrics for the view have changed. | 208 // Invoked when the viewport metrics for the view have changed. |
| 204 // Clients are expected to propagate this to the view tree. | 209 // Clients are expected to propagate this to the view tree. |
| 205 OnViewViewportMetricsChanged(mojo.ViewportMetrics old_metrics, | 210 OnViewViewportMetricsChanged(mojo.ViewportMetrics old_metrics, |
| 206 mojo.ViewportMetrics new_metrics); | 211 mojo.ViewportMetrics new_metrics); |
| 207 | 212 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 246 |
| 242 // Invoked when a view property is changed. If this change is a removal, | 247 // Invoked when a view property is changed. If this change is a removal, |
| 243 // |new_data| is null. | 248 // |new_data| is null. |
| 244 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); | 249 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); |
| 245 | 250 |
| 246 // Invoked when an event is targeted at the specified view. | 251 // Invoked when an event is targeted at the specified view. |
| 247 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 252 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
| 248 | 253 |
| 249 OnViewFocused(uint32 focused_view_id); | 254 OnViewFocused(uint32 focused_view_id); |
| 250 }; | 255 }; |
| OLD | NEW |