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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 handle<message_pipe> window_manager_pipe); | 152 handle<message_pipe> window_manager_pipe); |
153 | 153 |
154 // Invoked when the application embedded at |view| is disconnected. | 154 // Invoked when the application embedded at |view| is disconnected. |
155 OnEmbeddedAppDisconnected(uint32 view); | 155 OnEmbeddedAppDisconnected(uint32 view); |
156 | 156 |
157 // Invoked when a view's bounds have changed. | 157 // Invoked when a view's bounds have changed. |
158 OnViewBoundsChanged(uint32 view, | 158 OnViewBoundsChanged(uint32 view, |
159 mojo.Rect old_bounds, | 159 mojo.Rect old_bounds, |
160 mojo.Rect new_bounds); | 160 mojo.Rect new_bounds); |
161 | 161 |
| 162 // Invoked when the viewport metrics for the view have changed. |
| 163 // Clients are expected to propagate this to the view tree. |
| 164 OnViewViewportMetricsChanged(mojo.ViewportMetrics old_metrics, |
| 165 mojo.ViewportMetrics new_metrics); |
| 166 |
162 // Invoked when a change is done to the hierarchy. A value of 0 is used to | 167 // Invoked when a change is done to the hierarchy. A value of 0 is used to |
163 // identify a null view. For example, if the old_parent is NULL, 0 is | 168 // identify a null view. For example, if the old_parent is NULL, 0 is |
164 // supplied. | 169 // supplied. |
165 // |views| contains any views that are that the client has not been told | 170 // |views| contains any views that are that the client has not been told |
166 // about. This is not sent for hierarchy changes of views not known to this | 171 // about. This is not sent for hierarchy changes of views not known to this |
167 // client or not attached to the tree. | 172 // client or not attached to the tree. |
168 OnViewHierarchyChanged(uint32 view, | 173 OnViewHierarchyChanged(uint32 view, |
169 uint32 new_parent, | 174 uint32 new_parent, |
170 uint32 old_parent, | 175 uint32 old_parent, |
171 array<ViewData> views); | 176 array<ViewData> views); |
172 | 177 |
173 // Invoked when the order of views within a parent changes. | 178 // Invoked when the order of views within a parent changes. |
174 OnViewReordered(uint32 view_id, | 179 OnViewReordered(uint32 view_id, |
175 uint32 relative_view_id, | 180 uint32 relative_view_id, |
176 OrderDirection direction); | 181 OrderDirection direction); |
177 | 182 |
178 // Invoked when a view is deleted. | 183 // Invoked when a view is deleted. |
179 OnViewDeleted(uint32 view); | 184 OnViewDeleted(uint32 view); |
180 | 185 |
181 // Invoked when the visibility of the specified view changes. | 186 // Invoked when the visibility of the specified view changes. |
182 OnViewVisibilityChanged(uint32 view, bool visible); | 187 OnViewVisibilityChanged(uint32 view, bool visible); |
183 | 188 |
184 // Invoked when a change to the visibility of |view| or one if it's ancestors | 189 // Invoked when a change to the visibility of |view| or one if it's ancestors |
185 // is done such that the drawn state changes. This is only invoked for the | 190 // is done such that the drawn state changes. This is only invoked for the |
186 // top most view of a particular connection. For example, if you have the | 191 // top most view of a particular connection. For example, if you have the |
187 // hierarchy: A -> B1 -> B2 (B2 is a child of B1 and B1 a child of A), B1/B2 | 192 // hierarchy: A -> B1 -> B2 (B2 is a child of B1 and B1 a child of A), B1/B2 |
188 // are from connection 2 and A from connection 1 with all views visible and | 193 // are from connection 2 and A from connection 1 with all views visible and |
189 // drawn and the visiblity of A changes to false, then connection 2 is told | 194 // drawn and the visiblity of A changes to false, then connection 2 is told |
190 // the drawn state of B1 has changed (to false), but is not told anything | 195 // the drawn state of B1 has changed (to false), but is not told anything |
191 // about B2 as it's drawn state can be calculated from that of B1. | 196 // about B2 as it's drawn state can be calculated from that of B1. |
192 // | 197 // |
193 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. | 198 // NOTE: This is not invoked if OnViewVisibilityChanged() is invoked. |
194 OnViewDrawnStateChanged(uint32 view, bool drawn); | 199 OnViewDrawnStateChanged(uint32 view, bool drawn); |
195 | 200 |
196 // Invoked when a view property is changed. If this change is a removal, | 201 // Invoked when a view property is changed. If this change is a removal, |
197 // |new_data| is null. | 202 // |new_data| is null. |
198 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); | 203 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); |
199 | 204 |
200 // Invoked when an event is targeted at the specified view. | 205 // Invoked when an event is targeted at the specified view. |
201 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 206 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
202 }; | 207 }; |
OLD | NEW |