| 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/ui/views/interfaces/layouts.mojom"; | 9 import "mojo/services/ui/views/interfaces/layouts.mojom"; |
| 10 import "mojo/services/ui/views/interfaces/views.mojom"; | 10 import "mojo/services/ui/views/interfaces/views.mojom"; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // | 115 // |
| 116 // The returned |info| is null if this layout request was canceled either | 116 // The returned |info| is null if this layout request was canceled either |
| 117 // because it has been superceded by a subsequently issued layout request | 117 // because it has been superceded by a subsequently issued layout request |
| 118 // or because the root has become unavailable. | 118 // or because the root has become unavailable. |
| 119 // | 119 // |
| 120 // It is an error to call this function if the view tree does not currently | 120 // It is an error to call this function if the view tree does not currently |
| 121 // have a root; the connection will be closed. | 121 // have a root; the connection will be closed. |
| 122 // | 122 // |
| 123 // It is an error to specify malformed |root_layout_params| such | 123 // It is an error to specify malformed |root_layout_params| such |
| 124 // as invalid size constraints; the connection will be closed. | 124 // as invalid size constraints; the connection will be closed. |
| 125 LayoutRoot(mojo.ui.ViewLayoutParams root_layout_params) => | 125 LayoutRoot(mojo.ui.ViewLayoutParams root_layout_params) => (mojo.ui.ViewLayout
Info? info); |
| 126 (mojo.ui.ViewLayoutInfo? info); | |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 // An interface clients may implement to receive events from a view tree. | 128 // An interface clients may implement to receive events from a view tree. |
| 130 interface ViewTreeListener { | 129 interface ViewTreeListener { |
| 131 // Called when the tree needs to update its layout. | 130 // Called when the tree needs to update its layout. |
| 132 // | 131 // |
| 133 // This method may be called for one or more of the following reasons: | 132 // This method may be called for one or more of the following reasons: |
| 134 // | 133 // |
| 135 // 1. The root was just set. | 134 // 1. The root was just set. |
| 136 // 2. The root produced different layout information during its last | 135 // 2. The root produced different layout information during its last |
| (...skipping 10 matching lines...) Expand all Loading... |
| 147 // Called when the root view has become unavailable. | 146 // Called when the root view has become unavailable. |
| 148 // | 147 // |
| 149 // The root may become unavailable for many reasons such being unregistered | 148 // The root may become unavailable for many reasons such being unregistered |
| 150 // by its application, abnormal termination of its application, or | 149 // by its application, abnormal termination of its application, or |
| 151 // being reparented into a different view tree. | 150 // being reparented into a different view tree. |
| 152 // | 151 // |
| 153 // The implementation should invoke the callback once the event has | 152 // The implementation should invoke the callback once the event has |
| 154 // been handled. | 153 // been handled. |
| 155 OnRootUnavailable(uint32 root_key) => (); | 154 OnRootUnavailable(uint32 root_key) => (); |
| 156 }; | 155 }; |
| OLD | NEW |