OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
| 5 part of html; |
| 6 |
5 typedef Object ComputeValue(); | 7 typedef Object ComputeValue(); |
6 | 8 |
7 class _MeasurementRequest<T> { | 9 class _MeasurementRequest<T> { |
8 final ComputeValue computeValue; | 10 final ComputeValue computeValue; |
9 final Completer<T> completer; | 11 final Completer<T> completer; |
10 Object value; | 12 Object value; |
11 bool exception = false; | 13 bool exception = false; |
12 _MeasurementRequest(this.computeValue, this.completer); | 14 _MeasurementRequest(this.computeValue, this.completer); |
13 } | 15 } |
14 | 16 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 192 } |
191 } | 193 } |
192 | 194 |
193 if (readyMeasurementFrameCallbacks != null) { | 195 if (readyMeasurementFrameCallbacks != null) { |
194 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) { | 196 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) { |
195 // TODO(jacobr): wrap each call to a handler in a try-catch block. | 197 // TODO(jacobr): wrap each call to a handler in a try-catch block. |
196 handler(); | 198 handler(); |
197 } | 199 } |
198 } | 200 } |
199 } | 201 } |
OLD | NEW |