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

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

Issue 1729813002: Some dart2js fixes with new IDL. RequestCallback name and web_sql import (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged again Created 4 years, 10 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
« no previous file with comments | « tools/dom/templates/html/dart2js/web_sql_dart2js.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 @DocsEditable() 7 @DocsEditable()
8 $if DART2JS 8 $if DART2JS
9 $(ANNOTATIONS)@Native("Window,DOMWindow") 9 $(ANNOTATIONS)@Native("Window,DOMWindow")
10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { 10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 * 106 *
107 * Returns a non-zero valued integer to represent the request id for this 107 * Returns a non-zero valued integer to represent the request id for this
108 * request. This value only needs to be saved if you intend to call 108 * request. This value only needs to be saved if you intend to call
109 * [cancelAnimationFrame] so you can specify the particular animation to 109 * [cancelAnimationFrame] so you can specify the particular animation to
110 * cancel. 110 * cancel.
111 * 111 *
112 * Note: The supplied [callback] needs to call [requestAnimationFrame] again 112 * Note: The supplied [callback] needs to call [requestAnimationFrame] again
113 * for the animation to continue. 113 * for the animation to continue.
114 */ 114 */
115 @DomName('Window.requestAnimationFrame') 115 @DomName('Window.requestAnimationFrame')
116 int requestAnimationFrame(RequestAnimationFrameCallback callback) { 116 int requestAnimationFrame(FrameRequestCallback callback) {
117 _ensureRequestAnimationFrame(); 117 _ensureRequestAnimationFrame();
118 return _requestAnimationFrame(_wrapZone(callback)); 118 return _requestAnimationFrame(_wrapZone(callback));
119 } 119 }
120 120
121 /** 121 /**
122 * Cancels an animation frame request. 122 * Cancels an animation frame request.
123 * 123 *
124 * ## Other resources 124 * ## Other resources
125 * 125 *
126 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We b/API/Window.cancelAnimationFrame) 126 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We b/API/Window.cancelAnimationFrame)
127 * from MDN. 127 * from MDN.
128 */ 128 */
129 void cancelAnimationFrame(int id) { 129 void cancelAnimationFrame(int id) {
130 _ensureRequestAnimationFrame(); 130 _ensureRequestAnimationFrame();
131 _cancelAnimationFrame(id); 131 _cancelAnimationFrame(id);
132 } 132 }
133 133
134 @JSName('requestAnimationFrame') 134 @JSName('requestAnimationFrame')
135 int _requestAnimationFrame(RequestAnimationFrameCallback callback) native; 135 int _requestAnimationFrame(FrameRequestCallback callback) native;
136 136
137 @JSName('cancelAnimationFrame') 137 @JSName('cancelAnimationFrame')
138 void _cancelAnimationFrame(int id) native; 138 void _cancelAnimationFrame(int id) native;
139 139
140 _ensureRequestAnimationFrame() { 140 _ensureRequestAnimationFrame() {
141 if (JS('bool', 141 if (JS('bool',
142 '!!(#.requestAnimationFrame && #.cancelAnimationFrame)', this, this)) 142 '!!(#.requestAnimationFrame && #.cancelAnimationFrame)', this, this))
143 return; 143 return;
144 144
145 JS('void', 145 JS('void',
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 * 193 *
194 * Returns a non-zero valued integer to represent the request id for this 194 * Returns a non-zero valued integer to represent the request id for this
195 * request. This value only needs to be saved if you intend to call 195 * request. This value only needs to be saved if you intend to call
196 * [cancelAnimationFrame] so you can specify the particular animation to 196 * [cancelAnimationFrame] so you can specify the particular animation to
197 * cancel. 197 * cancel.
198 * 198 *
199 * Note: The supplied [callback] needs to call [requestAnimationFrame] again 199 * Note: The supplied [callback] needs to call [requestAnimationFrame] again
200 * for the animation to continue. 200 * for the animation to continue.
201 */ 201 */
202 @DomName('Window.requestAnimationFrame') 202 @DomName('Window.requestAnimationFrame')
203 int requestAnimationFrame(RequestAnimationFrameCallback callback) { 203 int requestAnimationFrame(FrameRequestCallback callback) {
204 return _requestAnimationFrame(_wrapZone(callback)); 204 return _requestAnimationFrame(_wrapZone(callback));
205 } 205 }
206 $endif 206 $endif
207 207
208 /** 208 /**
209 * Access a sandboxed file system of the specified `size`. If `persistent` is 209 * Access a sandboxed file system of the specified `size`. If `persistent` is
210 * true, the application will request permission from the user to create 210 * true, the application will request permission from the user to create
211 * lasting storage. This storage cannot be freed without the user's 211 * lasting storage. This storage cannot be freed without the user's
212 * permission. Returns a [Future] whose value stores a reference to the 212 * permission. Returns a [Future] whose value stores a reference to the
213 * sandboxed file system for use. Because the file system is sandboxed, 213 * sandboxed file system for use. Because the file system is sandboxed,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false }) { 362 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false }) {
363 return new _ElementEventStreamImpl(e, _eventType, useCapture); 363 return new _ElementEventStreamImpl(e, _eventType, useCapture);
364 } 364 }
365 365
366 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, 366 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e,
367 {bool useCapture: false}) { 367 {bool useCapture: false}) {
368 return new _ElementListEventStreamImpl(e, _eventType, useCapture); 368 return new _ElementListEventStreamImpl(e, _eventType, useCapture);
369 } 369 }
370 } 370 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698