| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo.ui; | 6 module mojo.ui; |
| 7 | 7 |
| 8 import "mojo/public/interfaces/application/service_provider.mojom"; | 8 import "mojo/public/interfaces/application/service_provider.mojom"; |
| 9 import "mojo/services/gfx/composition/interfaces/scenes.mojom"; | 9 import "mojo/services/gfx/composition/interfaces/scenes.mojom"; |
| 10 import "mojo/services/ui/views/interfaces/layouts.mojom"; | 10 import "mojo/services/ui/views/interfaces/layouts.mojom"; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // | 234 // |
| 235 // Recursive layout happens in any of the following circumstances: | 235 // Recursive layout happens in any of the following circumstances: |
| 236 // | 236 // |
| 237 // 1. If the resulting scene has changed since the last layout. | 237 // 1. If the resulting scene has changed since the last layout. |
| 238 // 2. If the resulting size has changed since the last layout. | 238 // 2. If the resulting size has changed since the last layout. |
| 239 // | 239 // |
| 240 // It is an error to return a malformed |result| which does not satisfy | 240 // It is an error to return a malformed |result| which does not satisfy |
| 241 // the requested |layout_params|, such as by returning a size which | 241 // the requested |layout_params|, such as by returning a size which |
| 242 // exceeds the requested constraints; the view's connection will be closed. | 242 // exceeds the requested constraints; the view's connection will be closed. |
| 243 OnLayout(mojo.ui.ViewLayoutParams layout_params, | 243 OnLayout(mojo.ui.ViewLayoutParams layout_params, |
| 244 array<uint32> children_needing_layout) => (mojo.ui.ViewLayoutResult result); | 244 array<uint32> children_needing_layout) |
| 245 => (mojo.ui.ViewLayoutResult result); |
| 245 | 246 |
| 246 // Called when a child view has become unavailable. | 247 // Called when a child view has become unavailable. |
| 247 // | 248 // |
| 248 // A child may become unavailable for many reasons such being unregistered | 249 // A child may become unavailable for many reasons such being unregistered |
| 249 // by its application, abnormal termination of its application, or | 250 // by its application, abnormal termination of its application, or |
| 250 // cycles being introduced in the view tree. | 251 // cycles being introduced in the view tree. |
| 251 // | 252 // |
| 252 // To complete removal of an unavailable child, this view component must | 253 // To complete removal of an unavailable child, this view component must |
| 253 // call RemoveChild() on its view with |child_key|. | 254 // call RemoveChild() on its view with |child_key|. |
| 254 // | 255 // |
| 255 // The implementation should invoke the callback once the event has | 256 // The implementation should invoke the callback once the event has |
| 256 // been handled. | 257 // been handled. |
| 257 OnChildUnavailable(uint32 child_key) => (); | 258 OnChildUnavailable(uint32 child_key) => (); |
| 258 }; | 259 }; |
| OLD | NEW |