| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class _AudioContextFactoryProvider { | 5 class _AudioContextFactoryProvider { |
| 6 | 6 |
| 7 factory AudioContext() native ''' | 7 factory AudioContext() native ''' |
| 8 var constructor = window.AudioContext || window.webkitAudioContext; | 8 var constructor = window.AudioContext || window.webkitAudioContext; |
| 9 return new constructor(); | 9 return new constructor(); |
| 10 '''; | 10 '''; |
| 11 } | 11 } |
| 12 | 12 |
| 13 class _DOMParserFactoryProvider { | |
| 14 | |
| 15 factory DOMParser() native '''return new DOMParser();'''; | |
| 16 } | |
| 17 | |
| 18 class _FileReaderFactoryProvider { | |
| 19 | |
| 20 factory FileReader() native '''return new FileReader();'''; | |
| 21 } | |
| 22 | |
| 23 class _TypedArrayFactoryProvider { | 13 class _TypedArrayFactoryProvider { |
| 24 | 14 |
| 25 factory Float32Array(int length) => _F32(length); | 15 factory Float32Array(int length) => _F32(length); |
| 26 factory Float32Array.fromList(List<num> list) => _F32(ensureNative(list)); | 16 factory Float32Array.fromList(List<num> list) => _F32(ensureNative(list)); |
| 27 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _F32(buffer); | 17 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _F32(buffer); |
| 28 | 18 |
| 29 factory Float64Array(int length) => _F64(length); | 19 factory Float64Array(int length) => _F64(length); |
| 30 factory Float64Array.fromList(List<num> list) => _F64(ensureNative(list)); | 20 factory Float64Array.fromList(List<num> list) => _F64(ensureNative(list)); |
| 31 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _F64(buffer); | 21 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _F64(buffer); |
| 32 | 22 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 static Int16Array _I16(arg) native 'return new Int16Array(arg);'; | 54 static Int16Array _I16(arg) native 'return new Int16Array(arg);'; |
| 65 static Int32Array _I32(arg) native 'return new Int32Array(arg);'; | 55 static Int32Array _I32(arg) native 'return new Int32Array(arg);'; |
| 66 static Uint8Array _U8(arg) native 'return new Uint8Array(arg);'; | 56 static Uint8Array _U8(arg) native 'return new Uint8Array(arg);'; |
| 67 static Uint16Array _U16(arg) native 'return new Uint16Array(arg);'; | 57 static Uint16Array _U16(arg) native 'return new Uint16Array(arg);'; |
| 68 static Uint32Array _U32(arg) native 'return new Uint32Array(arg);'; | 58 static Uint32Array _U32(arg) native 'return new Uint32Array(arg);'; |
| 69 static Uint8ClampedArray _U8C(arg) native 'return new Uint8ClampedArray(arg);'
; | 59 static Uint8ClampedArray _U8C(arg) native 'return new Uint8ClampedArray(arg);'
; |
| 70 | 60 |
| 71 static ensureNative(List list) => list; // TODO: make sure. | 61 static ensureNative(List list) => list; // TODO: make sure. |
| 72 } | 62 } |
| 73 | 63 |
| 74 class _WebKitCSSMatrixFactoryProvider { | |
| 75 | |
| 76 factory WebKitCSSMatrix([String spec = '']) native | |
| 77 '''return new WebKitCSSMatrix(spec);'''; | |
| 78 } | |
| 79 | |
| 80 class _WebKitPointFactoryProvider { | 64 class _WebKitPointFactoryProvider { |
| 81 | 65 |
| 82 factory WebKitPoint(num x, num y) native '''return new WebKitPoint(x, y);'''; | 66 factory WebKitPoint(num x, num y) native '''return new WebKitPoint(x, y);'''; |
| 83 } | 67 } |
| 84 | 68 |
| 85 class _WebSocketFactoryProvider { | 69 class _WebSocketFactoryProvider { |
| 86 | 70 |
| 87 factory WebSocket(String url) native '''return new WebSocket(url);'''; | 71 factory WebSocket(String url) native '''return new WebSocket(url);'''; |
| 88 } | 72 } |
| 89 | |
| 90 class _XMLHttpRequestFactoryProvider { | |
| 91 | |
| 92 factory XMLHttpRequest() native '''return new XMLHttpRequest();'''; | |
| 93 } | |
| 94 | |
| 95 class _XSLTProcessorFactoryProvider { | |
| 96 | |
| 97 factory XSLTProcessor() native '''return new XSLTProcessor();'''; | |
| 98 } | |
| OLD | NEW |