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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11348382: Moving AudioElement back to dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/scripts/htmlrenamer.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 2c235edc533478bd909e8d3b9683b63ec7dbf695..fc2337655d7a0250e447a32a476366dc0b1c4506 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -374,6 +374,21 @@ class Attr extends Node native "*Attr" {
// BSD-style license that can be found in the LICENSE file.
+/// @domName HTMLAudioElement; @docsEditable true
+class AudioElement extends MediaElement native "*HTMLAudioElement" {
+
+ factory AudioElement([String src]) {
+ if (!?src) {
+ return _AudioElementFactoryProvider.createAudioElement();
+ }
+ return _AudioElementFactoryProvider.createAudioElement(src);
+ }
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
/// @domName HTMLBRElement; @docsEditable true
class BRElement extends Element implements Element native "*HTMLBRElement" {
@@ -7569,26 +7584,6 @@ class ElementEvents extends Events {
// BSD-style license that can be found in the LICENSE file.
-/// @domName ElementTimeControl
-abstract class ElementTimeControl {
-
- /// @domName ElementTimeControl.beginElement; @docsEditable true
- void beginElement();
-
- /// @domName ElementTimeControl.beginElementAt; @docsEditable true
- void beginElementAt(num offset);
-
- /// @domName ElementTimeControl.endElement; @docsEditable true
- void endElement();
-
- /// @domName ElementTimeControl.endElementAt; @docsEditable true
- void endElementAt(num offset);
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
/// @domName ElementTraversal
abstract class ElementTraversal {
@@ -18267,14 +18262,6 @@ typedef void VoidCallback();
// BSD-style license that can be found in the LICENSE file.
-/// @domName WaveTable; @docsEditable true
-class WaveTable native "*WaveTable" {
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
/// @domName WebGLActiveInfo; @docsEditable true
class WebGLActiveInfo native "*WebGLActiveInfo" {
@@ -20178,6 +20165,17 @@ class _ArrayBufferFactoryProvider {
// BSD-style license that can be found in the LICENSE file.
+class _AudioElementFactoryProvider {
+ static AudioElement createAudioElement([String src = null]) {
+ if (src == null) return JS('AudioElement', 'new Audio()');
+ return JS('AudioElement', 'new Audio(#)', src);
+ }
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
class _BlobFactoryProvider {
static Blob createBlob([List blobParts = null, String type, String endings]) {
// TODO: validate that blobParts is a JS Array and convert if not.
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/scripts/htmlrenamer.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698