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

Side by Side Diff: tools/dom/templates/html/impl/impl_Window.darttemplate

Issue 12510003: Fixing a number of dart:html analyzer issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « tools/dom/templates/html/impl/impl_Geolocation.darttemplate ('k') | no next file » | 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 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $if DART2JS 7 $if DART2JS
8 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { 8 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
9 $else 9 $else
10 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 10 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 * Returns a Future that completes just before the window is about to repaint 51 * Returns a Future that completes just before the window is about to repaint
52 * so the user can draw an animation frame 52 * so the user can draw an animation frame
53 * 53 *
54 * If you need to later cancel this animation, use [requestAnimationFrame] 54 * If you need to later cancel this animation, use [requestAnimationFrame]
55 * instead. 55 * instead.
56 * 56 *
57 * Note: The code that runs when the future completes should call 57 * Note: The code that runs when the future completes should call
58 * [animationFrame] again for the animation to continue. 58 * [animationFrame] again for the animation to continue.
59 */ 59 */
60 Future<num> get animationFrame { 60 Future<num> get animationFrame {
61 var completer = new Completer<int>(); 61 var completer = new Completer<num>();
62 requestAnimationFrame(completer.complete); 62 requestAnimationFrame((time) {
63 completer.complete(time);
64 });
63 return completer.future; 65 return completer.future;
64 } 66 }
65 67
66 $if DART2JS 68 $if DART2JS
67 Document get document => JS('Document', '#.document', this); 69 Document get document => JS('Document', '#.document', this);
68 70
69 WindowBase _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name); 71 WindowBase _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name);
70 72
71 WindowBase _open3(url, name, options) => 73 WindowBase _open3(url, name, options) =>
72 JS('Window', '#.open(#,#,#)', this, url, name, options); 74 JS('Window', '#.open(#,#,#)', this, url, name, options);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 static bool get _supportsSetImmediate => false; 220 static bool get _supportsSetImmediate => false;
219 221
220 /// Dartium stub for IE's setImmediate. 222 /// Dartium stub for IE's setImmediate.
221 void _setImmediate(void callback()) { 223 void _setImmediate(void callback()) {
222 throw new UnsupportedError('setImmediate is not supported'); 224 throw new UnsupportedError('setImmediate is not supported');
223 } 225 }
224 $endif 226 $endif
225 227
226 $!MEMBERS 228 $!MEMBERS
227 } 229 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Geolocation.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698