OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
6 | 6 |
7 class _DOMURLWrappingImplementation extends DOMWrapperBase implements DOMURL { | 7 class _DOMURLWrappingImplementation extends DOMWrapperBase implements DOMURL { |
8 _DOMURLWrappingImplementation() : super() {} | 8 _DOMURLWrappingImplementation() : super() {} |
9 | 9 |
10 static create__DOMURLWrappingImplementation() native { | 10 static create__DOMURLWrappingImplementation() native { |
11 return new _DOMURLWrappingImplementation(); | 11 return new _DOMURLWrappingImplementation(); |
12 } | 12 } |
13 | 13 |
14 String createObjectURL(Blob blob) { | 14 String createObjectURL(var blob_OR_stream) { |
15 return _createObjectURL(this, blob); | 15 if (blob_OR_stream is MediaStream) { |
| 16 return _createObjectURL(this, blob_OR_stream); |
| 17 } else { |
| 18 if (blob_OR_stream is Blob) { |
| 19 return _createObjectURL_2(this, blob_OR_stream); |
| 20 } |
| 21 } |
| 22 throw "Incorrect number or type of arguments"; |
16 } | 23 } |
17 static String _createObjectURL(receiver, blob) native; | 24 static String _createObjectURL(receiver, blob_OR_stream) native; |
| 25 static String _createObjectURL_2(receiver, blob_OR_stream) native; |
18 | 26 |
19 void revokeObjectURL(String url) { | 27 void revokeObjectURL(String url) { |
20 _revokeObjectURL(this, url); | 28 _revokeObjectURL(this, url); |
21 return; | 29 return; |
22 } | 30 } |
23 static void _revokeObjectURL(receiver, url) native; | 31 static void _revokeObjectURL(receiver, url) native; |
24 | 32 |
25 String get typeName() { return "DOMURL"; } | 33 String get typeName() { return "DOMURL"; } |
26 } | 34 } |
OLD | NEW |