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) |
126 (mojo.ui.ViewLayoutInfo? info); | 126 => (mojo.ui.ViewLayoutInfo? info); |
127 }; | 127 }; |
128 | 128 |
129 // An interface clients may implement to receive events from a view tree. | 129 // An interface clients may implement to receive events from a view tree. |
130 interface ViewTreeListener { | 130 interface ViewTreeListener { |
131 // Called when the tree needs to update its layout. | 131 // Called when the tree needs to update its layout. |
132 // | 132 // |
133 // This method may be called for one or more of the following reasons: | 133 // This method may be called for one or more of the following reasons: |
134 // | 134 // |
135 // 1. The root was just set. | 135 // 1. The root was just set. |
136 // 2. The root produced different layout information during its last | 136 // 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. | 147 // Called when the root view has become unavailable. |
148 // | 148 // |
149 // The root may become unavailable for many reasons such being unregistered | 149 // The root may become unavailable for many reasons such being unregistered |
150 // by its application, abnormal termination of its application, or | 150 // by its application, abnormal termination of its application, or |
151 // being reparented into a different view tree. | 151 // being reparented into a different view tree. |
152 // | 152 // |
153 // The implementation should invoke the callback once the event has | 153 // The implementation should invoke the callback once the event has |
154 // been handled. | 154 // been handled. |
155 OnRootUnavailable(uint32 root_key) => (); | 155 OnRootUnavailable(uint32 root_key) => (); |
156 }; | 156 }; |
OLD | NEW |