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/renderers.mojom"; | 9 import "mojo/services/gfx/composition/interfaces/renderers.mojom"; |
10 import "mojo/services/ui/views/interfaces/layouts.mojom"; | 10 import "mojo/services/ui/views/interfaces/layouts.mojom"; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // | 124 // |
125 // The returned |info| is null if this layout request was canceled either | 125 // The returned |info| is null if this layout request was canceled either |
126 // because it has been superceded by a subsequently issued layout request | 126 // because it has been superceded by a subsequently issued layout request |
127 // or because the root has become unavailable. | 127 // or because the root has become unavailable. |
128 // | 128 // |
129 // It is an error to call this function if the view tree does not currently | 129 // It is an error to call this function if the view tree does not currently |
130 // have a root; the connection will be closed. | 130 // have a root; the connection will be closed. |
131 // | 131 // |
132 // It is an error to specify malformed |root_layout_params| such | 132 // It is an error to specify malformed |root_layout_params| such |
133 // as invalid size constraints; the connection will be closed. | 133 // as invalid size constraints; the connection will be closed. |
134 LayoutRoot(mojo.ui.ViewLayoutParams root_layout_params) => | 134 LayoutRoot(mojo.ui.ViewLayoutParams root_layout_params) |
135 (mojo.ui.ViewLayoutInfo? info); | 135 => (mojo.ui.ViewLayoutInfo? info); |
136 }; | 136 }; |
137 | 137 |
138 // An interface clients may implement to receive events from a view tree. | 138 // An interface clients may implement to receive events from a view tree. |
139 interface ViewTreeListener { | 139 interface ViewTreeListener { |
140 // Called when the tree needs to update its layout. | 140 // Called when the tree needs to update its layout. |
141 // | 141 // |
142 // This method may be called for one or more of the following reasons: | 142 // This method may be called for one or more of the following reasons: |
143 // | 143 // |
144 // 1. The root was just set. | 144 // 1. The root was just set. |
145 // 2. The root produced different layout information during its last | 145 // 2. The root produced different layout information during its last |
(...skipping 16 matching lines...) Expand all Loading... |
162 // The implementation should invoke the callback once the event has | 162 // The implementation should invoke the callback once the event has |
163 // been handled. | 163 // been handled. |
164 OnRootUnavailable(uint32 root_key) => (); | 164 OnRootUnavailable(uint32 root_key) => (); |
165 | 165 |
166 // Called when the tree's renderer connection closed unexpectedly. | 166 // Called when the tree's renderer connection closed unexpectedly. |
167 // | 167 // |
168 // The implementation should invoke the callback once the event has | 168 // The implementation should invoke the callback once the event has |
169 // been handled. | 169 // been handled. |
170 OnRendererDied() => (); | 170 OnRendererDied() => (); |
171 }; | 171 }; |
OLD | NEW |