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

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

Issue 12052076: Support overloaded constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5d466fd1f0ef7b82874fb50e84e70473c70dc492..ccfc6702526876727e8bc223c28d6e4a969ea1de 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -182,9 +182,6 @@ class AudioContext extends EventTarget native "*AudioContext" {
static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
@DocsEditable
- factory AudioContext() => AudioContext._create();
-
- @DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
@deprecated
AudioContextEvents get on =>
@@ -286,7 +283,7 @@ class AudioContext extends EventTarget native "*AudioContext" {
@DocsEditable
Stream<Event> get onComplete => completeEvent.forTarget(this);
- static AudioContext _create() => JS('AudioContext',
+ factory AudioContext() => JS('AudioContext',
'new (window.AudioContext || window.webkitAudioContext)()');
GainNode createGain() {
@@ -691,8 +688,10 @@ class OfflineAudioCompletionEvent extends Event native "*OfflineAudioCompletionE
class OfflineAudioContext extends AudioContext implements EventTarget native "*OfflineAudioContext" {
@DocsEditable
- factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num sampleRate) => OfflineAudioContext._create(numberOfChannels, numberOfFrames, sampleRate);
- static OfflineAudioContext _create(int numberOfChannels, int numberOfFrames, num sampleRate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChannels, numberOfFrames, sampleRate);
+ factory OfflineAudioContext(int numberOfChannels, int numberOfFrames, num sampleRate) {
+ return OfflineAudioContext._create_1(numberOfChannels, numberOfFrames, sampleRate);
+ }
+ static OfflineAudioContext _create_1(numberOfChannels, numberOfFrames, sampleRate) => JS('OfflineAudioContext', 'new OfflineAudioContext(#,#,#)', numberOfChannels, numberOfFrames, sampleRate);
}
// 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/web_audio/dartium/web_audio_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698