Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: lib/html/src/Measurement.dart

Issue 10880068: - Change "static final" to "static const" in the lib/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/html/src/KeyboardEvent.dart ('k') | lib/html/src/MutationEvent.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 typedef Object ComputeValue(); 5 typedef Object ComputeValue();
6 6
7 class _MeasurementRequest<T> { 7 class _MeasurementRequest<T> {
8 final ComputeValue computeValue; 8 final ComputeValue computeValue;
9 final Completer<T> completer; 9 final Completer<T> completer;
10 Object value; 10 Object value;
11 bool exception = false; 11 bool exception = false;
12 _MeasurementRequest(this.computeValue, this.completer); 12 _MeasurementRequest(this.computeValue, this.completer);
13 } 13 }
14 14
15 final _MEASUREMENT_MESSAGE = "DART-MEASURE"; 15 const _MEASUREMENT_MESSAGE = "DART-MEASURE";
16 List<_MeasurementRequest> _pendingRequests; 16 List<_MeasurementRequest> _pendingRequests;
17 List<TimeoutHandler> _pendingMeasurementFrameCallbacks; 17 List<TimeoutHandler> _pendingMeasurementFrameCallbacks;
18 bool _nextMeasurementFrameScheduled = false; 18 bool _nextMeasurementFrameScheduled = false;
19 bool _firstMeasurementRequest = true; 19 bool _firstMeasurementRequest = true;
20 20
21 void _maybeScheduleMeasurementFrame() { 21 void _maybeScheduleMeasurementFrame() {
22 if (_nextMeasurementFrameScheduled) return; 22 if (_nextMeasurementFrameScheduled) return;
23 23
24 _nextMeasurementFrameScheduled = true; 24 _nextMeasurementFrameScheduled = true;
25 // postMessage gives us a way to receive a callback after the current 25 // postMessage gives us a way to receive a callback after the current
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 113
114 if (readyMeasurementFrameCallbacks !== null) { 114 if (readyMeasurementFrameCallbacks !== null) {
115 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) { 115 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) {
116 // TODO(jacobr): wrap each call to a handler in a try-catch block. 116 // TODO(jacobr): wrap each call to a handler in a try-catch block.
117 handler(); 117 handler();
118 } 118 }
119 } 119 }
120 } 120 }
OLDNEW
« no previous file with comments | « lib/html/src/KeyboardEvent.dart ('k') | lib/html/src/MutationEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698