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

Unified Diff: sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate

Issue 11280103: Splitting out the Audio library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding missing lib registrations Created 8 years, 1 month 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/html/templates/html/impl/impl_AudioContext.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate b/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate
index b648c9c9056dfca1e70ff2ce63b8d4123b2d6a73..d72f80082312eea3515ee895478e28ca2799b73f 100644
--- a/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate
@@ -5,7 +5,18 @@
part of html;
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.create$CLASSNAME();
+$if DART2JS
+ factory AudioContext() => JS('AudioContext',
+ 'new (window.AudioContext || window.webkitAudioContext)()');
+$else
+ factory AudioContext() => _createAudioContext();
+
+ static _createAudioContext([int numberOfChannels,
+ int numberOfFrames,
+ int sampleRate])
+ native "AudioContext_constructor_Callback";
+$endif
+
$!MEMBERS
$if DART2JS
GainNode createGain() {
« no previous file with comments | « sdk/lib/html/templates/html/dartium/web_audio_dartium.darttemplate ('k') | sdk/lib/web_audio/dart2js/web_audio_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698