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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11447002: Re-trying moving AudioElement back to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing for dartium. Created 8 years 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 | « no previous file | sdk/lib/html/dartium/html_dartium.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 library html; 1 library html;
2 2
3 import 'dart:collection'; 3 import 'dart:collection';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 import 'dart:isolate'; 5 import 'dart:isolate';
6 import 'dart:json'; 6 import 'dart:json';
7 import 'dart:svg' as svg; 7 import 'dart:svg' as svg;
8 import 'dart:web_audio' as web_audio; 8 import 'dart:web_audio' as web_audio;
9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
10 // for details. All rights reserved. Use of this source code is governed by a 10 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 final bool specified; 368 final bool specified;
369 369
370 /// @domName Attr.value; @docsEditable true 370 /// @domName Attr.value; @docsEditable true
371 String value; 371 String value;
372 } 372 }
373 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 373 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
374 // for details. All rights reserved. Use of this source code is governed by a 374 // for details. All rights reserved. Use of this source code is governed by a
375 // BSD-style license that can be found in the LICENSE file. 375 // BSD-style license that can be found in the LICENSE file.
376 376
377 377
378 /// @domName HTMLAudioElement; @docsEditable true
379 class AudioElement extends MediaElement native "*HTMLAudioElement" {
380
381 factory AudioElement([String src]) {
382 if (!?src) {
383 return _AudioElementFactoryProvider.createAudioElement();
384 }
385 return _AudioElementFactoryProvider.createAudioElement(src);
386 }
387 }
388 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
389 // for details. All rights reserved. Use of this source code is governed by a
390 // BSD-style license that can be found in the LICENSE file.
391
392
378 /// @domName HTMLBRElement; @docsEditable true 393 /// @domName HTMLBRElement; @docsEditable true
379 class BRElement extends Element implements Element native "*HTMLBRElement" { 394 class BRElement extends Element implements Element native "*HTMLBRElement" {
380 395
381 factory BRElement() => document.$dom_createElement("br"); 396 factory BRElement() => document.$dom_createElement("br");
382 397
383 /// @domName HTMLBRElement.clear; @docsEditable true 398 /// @domName HTMLBRElement.clear; @docsEditable true
384 String clear; 399 String clear;
385 } 400 }
386 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 401 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
387 // for details. All rights reserved. Use of this source code is governed by a 402 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 7191 matching lines...) Expand 10 before | Expand all | Expand 10 after
7579 // Firefox 7594 // Firefox
7580 return this['DOMMouseScroll']; 7595 return this['DOMMouseScroll'];
7581 } 7596 }
7582 } 7597 }
7583 } 7598 }
7584 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 7599 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7585 // for details. All rights reserved. Use of this source code is governed by a 7600 // for details. All rights reserved. Use of this source code is governed by a
7586 // BSD-style license that can be found in the LICENSE file. 7601 // BSD-style license that can be found in the LICENSE file.
7587 7602
7588 7603
7589 /// @domName ElementTimeControl
7590 abstract class ElementTimeControl {
7591
7592 /// @domName ElementTimeControl.beginElement; @docsEditable true
7593 void beginElement();
7594
7595 /// @domName ElementTimeControl.beginElementAt; @docsEditable true
7596 void beginElementAt(num offset);
7597
7598 /// @domName ElementTimeControl.endElement; @docsEditable true
7599 void endElement();
7600
7601 /// @domName ElementTimeControl.endElementAt; @docsEditable true
7602 void endElementAt(num offset);
7603 }
7604 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7605 // for details. All rights reserved. Use of this source code is governed by a
7606 // BSD-style license that can be found in the LICENSE file.
7607
7608
7609 /// @domName ElementTraversal 7604 /// @domName ElementTraversal
7610 abstract class ElementTraversal { 7605 abstract class ElementTraversal {
7611 7606
7612 int $dom_childElementCount; 7607 int $dom_childElementCount;
7613 7608
7614 Element $dom_firstElementChild; 7609 Element $dom_firstElementChild;
7615 7610
7616 Element $dom_lastElementChild; 7611 Element $dom_lastElementChild;
7617 7612
7618 Element nextElementSibling; 7613 Element nextElementSibling;
(...skipping 10810 matching lines...) Expand 10 before | Expand all | Expand 10 after
18429 18424
18430 // WARNING: Do not edit - generated code. 18425 // WARNING: Do not edit - generated code.
18431 18426
18432 18427
18433 typedef void VoidCallback(); 18428 typedef void VoidCallback();
18434 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 18429 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
18435 // for details. All rights reserved. Use of this source code is governed by a 18430 // for details. All rights reserved. Use of this source code is governed by a
18436 // BSD-style license that can be found in the LICENSE file. 18431 // BSD-style license that can be found in the LICENSE file.
18437 18432
18438 18433
18439 /// @domName WaveTable; @docsEditable true
18440 class WaveTable native "*WaveTable" {
18441 }
18442 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
18443 // for details. All rights reserved. Use of this source code is governed by a
18444 // BSD-style license that can be found in the LICENSE file.
18445
18446
18447 /// @domName WebGLActiveInfo; @docsEditable true 18434 /// @domName WebGLActiveInfo; @docsEditable true
18448 class WebGLActiveInfo native "*WebGLActiveInfo" { 18435 class WebGLActiveInfo native "*WebGLActiveInfo" {
18449 18436
18450 /// @domName WebGLActiveInfo.name; @docsEditable true 18437 /// @domName WebGLActiveInfo.name; @docsEditable true
18451 final String name; 18438 final String name;
18452 18439
18453 /// @domName WebGLActiveInfo.size; @docsEditable true 18440 /// @domName WebGLActiveInfo.size; @docsEditable true
18454 final int size; 18441 final int size;
18455 18442
18456 /// @domName WebGLActiveInfo.type; @docsEditable true 18443 /// @domName WebGLActiveInfo.type; @docsEditable true
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after
20340 20327
20341 class _ArrayBufferFactoryProvider { 20328 class _ArrayBufferFactoryProvider {
20342 static ArrayBuffer createArrayBuffer(int length) => 20329 static ArrayBuffer createArrayBuffer(int length) =>
20343 JS('ArrayBuffer', 'new ArrayBuffer(#)', length); 20330 JS('ArrayBuffer', 'new ArrayBuffer(#)', length);
20344 } 20331 }
20345 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 20332 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20346 // for details. All rights reserved. Use of this source code is governed by a 20333 // for details. All rights reserved. Use of this source code is governed by a
20347 // BSD-style license that can be found in the LICENSE file. 20334 // BSD-style license that can be found in the LICENSE file.
20348 20335
20349 20336
20337 class _AudioElementFactoryProvider {
20338 static AudioElement createAudioElement([String src = null]) {
20339 if (src == null) return JS('AudioElement', 'new Audio()');
20340 return JS('AudioElement', 'new Audio(#)', src);
20341 }
20342 }
20343 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20344 // for details. All rights reserved. Use of this source code is governed by a
20345 // BSD-style license that can be found in the LICENSE file.
20346
20347
20350 class _BlobFactoryProvider { 20348 class _BlobFactoryProvider {
20351 static Blob createBlob([List blobParts = null, String type, String endings]) { 20349 static Blob createBlob([List blobParts = null, String type, String endings]) {
20352 // TODO: validate that blobParts is a JS Array and convert if not. 20350 // TODO: validate that blobParts is a JS Array and convert if not.
20353 // TODO: any coercions on the elements of blobParts, e.g. coerce a typed 20351 // TODO: any coercions on the elements of blobParts, e.g. coerce a typed
20354 // array to ArrayBuffer if it is a total view. 20352 // array to ArrayBuffer if it is a total view.
20355 if (type == null && endings == null) { 20353 if (type == null && endings == null) {
20356 return _create_1(blobParts); 20354 return _create_1(blobParts);
20357 } 20355 }
20358 var bag = _create_bag(); 20356 var bag = _create_bag();
20359 if (type != null) _bag_set(bag, 'type', type); 20357 if (type != null) _bag_set(bag, 'type', type);
(...skipping 4909 matching lines...) Expand 10 before | Expand all | Expand 10 after
25269 T next() { 25267 T next() {
25270 if (!hasNext) { 25268 if (!hasNext) {
25271 throw new StateError("No more elements"); 25269 throw new StateError("No more elements");
25272 } 25270 }
25273 return _array[_pos++]; 25271 return _array[_pos++];
25274 } 25272 }
25275 25273
25276 final List<T> _array; 25274 final List<T> _array;
25277 int _pos; 25275 int _pos;
25278 } 25276 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698