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

Unified Diff: sdk/lib/web_audio/dart2js/web_audio_dart2js.dart

Issue 23889005: Cleaning up a bunch of DOM generation tables (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
index 1b1d0db65d1897176356e604dec13d62bcd44776..3a42513d99e19a72ace2fda8e901f8c7a4e4e5d0 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -1074,16 +1074,27 @@ class PannerNode extends AudioNode native "PannerNode,AudioPannerNode" {
@Experimental() // untriaged
class PeriodicWave extends Interceptor native "PeriodicWave" {
}
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// 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.
+@DocsEditable()
@DomName('ScriptProcessorNode')
// https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptProcessorNode
@Experimental()
class ScriptProcessorNode extends AudioNode native "ScriptProcessorNode,JavaScriptAudioNode" {
- Stream<AudioProcessingEvent> _eventStream;
+ // To suppress missing implicit constructor warnings.
+ factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported"); }
+
+ @DomName('ScriptProcessorNode.audioprocessEvent')
+ @DocsEditable()
+ @Experimental() // untriaged
+ static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent = const EventStreamProvider<AudioProcessingEvent>('audioprocess');
+
+ @DomName('ScriptProcessorNode.bufferSize')
+ @DocsEditable()
+ final int bufferSize;
/**
* Get a Stream that fires events when AudioProcessingEvents occur.
@@ -1092,36 +1103,10 @@ class ScriptProcessorNode extends AudioNode native "ScriptProcessorNode,JavaScri
* the soft-real-time properties which which these events are fired and can
* be processed.
*/
- Stream<AudioProcessingEvent> get onAudioProcess {
- if (_eventStream == null) {
- var controller = new StreamController(sync: true);
- var callback = (audioData) {
- if (controller.hasListener) {
- // This stream is a strange combination of broadcast and single
- // subscriber streams. We only allow one listener, but if there is
- // no listener, we don't queue up events, we just drop them on the
- // floor.
- controller.add(audioData);
- }
- };
- _setEventListener(callback);
- _eventStream = controller.stream;
- }
- return _eventStream;
- }
-
- _setEventListener(callback) {
- JS('void', '#.onaudioprocess = #', this,
- convertDartClosureToJS(callback, 1));
- }
-
- // To suppress missing implicit constructor warnings.
- factory ScriptProcessorNode._() { throw new UnsupportedError("Not supported"); }
-
- @DomName('ScriptProcessorNode.bufferSize')
+ @DomName('ScriptProcessorNode.onaudioprocess')
@DocsEditable()
- final int bufferSize;
-
+ @Experimental() // untriaged
Emily Fortuna 2013/09/04 17:23:32 is this actually untriaged? Did they change the
blois 2013/09/04 17:34:33 It appeared that the polyfill was necessary becaus
Emily Fortuna 2013/09/04 17:39:59 hooray!
+ Stream<AudioProcessingEvent> get onAudioProcess => audioProcessEvent.forTarget(this);
}
// 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

Powered by Google App Engine
This is Rietveld 408576698