| 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; |
| 6 |
| 5 import "mojo/public/interfaces/application/service_provider.mojom"; | 7 import "mojo/public/interfaces/application/service_provider.mojom"; |
| 6 import "mojo/services/public/interfaces/geometry/geometry.mojom"; | 8 import "mojo/services/public/interfaces/geometry/geometry.mojom"; |
| 7 import "mojo/services/public/interfaces/input_events/input_events.mojom"; | 9 import "mojo/services/public/interfaces/input_events/input_events.mojom"; |
| 8 import "mojo/services/public/interfaces/surfaces/surface_id.mojom"; | 10 import "mojo/services/public/interfaces/surfaces/surface_id.mojom"; |
| 9 import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojo
m"; | 11 import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojo
m"; |
| 10 | 12 |
| 11 module mojo { | |
| 12 | |
| 13 struct ViewData { | 13 struct ViewData { |
| 14 uint32 parent_id; | 14 uint32 parent_id; |
| 15 uint32 view_id; | 15 uint32 view_id; |
| 16 mojo.Rect bounds; | 16 mojo.Rect bounds; |
| 17 map<string, array<uint8>> properties; | 17 map<string, array<uint8>> properties; |
| 18 // True if this view is visible. The view may not be drawn on screen (see | 18 // True if this view is visible. The view may not be drawn on screen (see |
| 19 // drawn for specifics). | 19 // drawn for specifics). |
| 20 bool visible; | 20 bool visible; |
| 21 // True if this view is drawn on screen. A view is drawn if attached to the | 21 // 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. | 22 // root and all ancestors (including this view) are visible. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 uint32 view_id, | 129 uint32 view_id, |
| 130 ServiceProvider? service_provider) => (bool success); | 130 ServiceProvider? service_provider) => (bool success); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 // Changes to views are not sent to the connection that originated the | 133 // Changes to views are not sent to the connection that originated the |
| 134 // change. For example, if connection 1 changes the bounds of a view by calling | 134 // change. For example, if connection 1 changes the bounds of a view by calling |
| 135 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). | 135 // SetBounds(), connection 1 does not receive OnViewBoundsChanged(). |
| 136 [Client=ViewManagerService] | 136 [Client=ViewManagerService] |
| 137 interface ViewManagerClient { | 137 interface ViewManagerClient { |
| 138 // Invoked when the client application has been embedded at |root|. | 138 // Invoked when the client application has been embedded at |root|. |
| 139 // See Embed() on ViewManagerService for more details. | 139 // See Embed() on ViewManagerService for more details. |window_manager_pipe| |
| 140 // is a pipe to the WindowManager. |
| 140 OnEmbed(uint16 connection_id, | 141 OnEmbed(uint16 connection_id, |
| 141 string embedder_url, | 142 string embedder_url, |
| 142 ViewData root, | 143 ViewData root, |
| 143 ServiceProvider&? service_provider); | 144 ServiceProvider&? parent_service_provider, |
| 145 handle<message_pipe> window_manager_pipe); |
| 144 | 146 |
| 145 // Invoked when a view's bounds have changed. | 147 // Invoked when a view's bounds have changed. |
| 146 OnViewBoundsChanged(uint32 view, | 148 OnViewBoundsChanged(uint32 view, |
| 147 mojo.Rect old_bounds, | 149 mojo.Rect old_bounds, |
| 148 mojo.Rect new_bounds); | 150 mojo.Rect new_bounds); |
| 149 | 151 |
| 150 // Invoked when a change is done to the hierarchy. A value of 0 is used to | 152 // Invoked when a change is done to the hierarchy. A value of 0 is used to |
| 151 // identify a null view. For example, if the old_parent is NULL, 0 is | 153 // identify a null view. For example, if the old_parent is NULL, 0 is |
| 152 // supplied. | 154 // supplied. |
| 153 // |views| contains any views that are that the client has not been told | 155 // |views| contains any views that are that the client has not been told |
| (...skipping 27 matching lines...) Expand all Loading... |
| 181 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. | 183 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. |
| 182 OnViewDrawnStateChanged(uint32 view, bool drawn); | 184 OnViewDrawnStateChanged(uint32 view, bool drawn); |
| 183 | 185 |
| 184 // Invoked when a view property is changed. If this change is a removal, | 186 // Invoked when a view property is changed. If this change is a removal, |
| 185 // |new_data| is null. | 187 // |new_data| is null. |
| 186 OnViewPropertyChanged(uint32 view, string name, array<uint8>? new_data); | 188 OnViewPropertyChanged(uint32 view, string name, array<uint8>? new_data); |
| 187 | 189 |
| 188 // Invoked when an event is targeted at the specified view. | 190 // Invoked when an event is targeted at the specified view. |
| 189 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 191 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
| 190 }; | 192 }; |
| 191 | |
| 192 } | |
| OLD | NEW |