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

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

Issue 14630016: Getting html_dart2js and html_dartium a bit more in sync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
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 "Window,DOMWindow" { 8 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "Window,DOMWindow" {
9 $else 9 $else
10 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 10 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 * 145 *
146 * Note: The supplied [callback] needs to call [requestAnimationFrame] again 146 * Note: The supplied [callback] needs to call [requestAnimationFrame] again
147 * for the animation to continue. 147 * for the animation to continue.
148 */ 148 */
149 @DomName('DOMWindow.requestAnimationFrame') 149 @DomName('DOMWindow.requestAnimationFrame')
150 int requestAnimationFrame(RequestAnimationFrameCallback callback) { 150 int requestAnimationFrame(RequestAnimationFrameCallback callback) {
151 _ensureRequestAnimationFrame(); 151 _ensureRequestAnimationFrame();
152 return _requestAnimationFrame(callback); 152 return _requestAnimationFrame(callback);
153 } 153 }
154 154
155 void cancelAnimationFrame(id) { 155 void cancelAnimationFrame(int id) {
156 _ensureRequestAnimationFrame(); 156 _ensureRequestAnimationFrame();
157 _cancelAnimationFrame(id); 157 _cancelAnimationFrame(id);
158 } 158 }
159 159
160 @JSName('requestAnimationFrame') 160 @JSName('requestAnimationFrame')
161 int _requestAnimationFrame(RequestAnimationFrameCallback callback) native; 161 int _requestAnimationFrame(RequestAnimationFrameCallback callback) native;
162 162
163 @JSName('cancelAnimationFrame') 163 @JSName('cancelAnimationFrame')
164 void _cancelAnimationFrame(int id) native; 164 void _cancelAnimationFrame(int id) native;
165 165
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 @SupportedBrowser(SupportedBrowser.CHROME, '23.0') 198 @SupportedBrowser(SupportedBrowser.CHROME, '23.0')
199 @SupportedBrowser(SupportedBrowser.FIREFOX, '15.0') 199 @SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
200 @SupportedBrowser(SupportedBrowser.IE, '10.0') 200 @SupportedBrowser(SupportedBrowser.IE, '10.0')
201 @Experimental 201 @Experimental
202 IdbFactory get indexedDB => 202 IdbFactory get indexedDB =>
203 JS('IdbFactory|Null', // If not supported, returns `null`. 203 JS('IdbFactory|Null', // If not supported, returns `null`.
204 '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB', 204 '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
205 this, this, this); 205 this, this, this);
206 206
207 @DomName('Window.console') 207 @DomName('Window.console')
208 Console get console => Console.safeConsole; 208 Console get console => Console._safeConsole;
209 209
210 /// Checks if _setImmediate is supported. 210 /// Checks if _setImmediate is supported.
211 static bool get _supportsSetImmediate => 211 static bool get _supportsSetImmediate =>
212 JS('bool', '!!(window.setImmediate)'); 212 JS('bool', '!!(window.setImmediate)');
213 213
214 // Set immediate implementation for IE 214 // Set immediate implementation for IE
215 void _setImmediate(void callback()) { 215 void _setImmediate(void callback()) {
216 JS('void', '#.setImmediate(#)', this, convertDartClosureToJS(callback, 0)); 216 JS('void', '#.setImmediate(#)', this, convertDartClosureToJS(callback, 0));
217 } 217 }
218 $else 218 $else
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 return wrapped.returnValue; 323 return wrapped.returnValue;
324 }); 324 });
325 325
326 return controller.stream; 326 return controller.stream;
327 } 327 }
328 328
329 String getEventType(EventTarget target) { 329 String getEventType(EventTarget target) {
330 return _eventType; 330 return _eventType;
331 } 331 }
332 } 332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698