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 factory AudioContext() => _wrap(new dom.AudioContext()); | 6 factory AudioContext() => _wrap(new dom.AudioContext()); |
7 } | 7 } |
8 | 8 |
9 class _TypedArrayFactoryProvider { | 9 class _TypedArrayFactoryProvider { |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 static Float32Array _F32(arg) => _wrap(new dom.Float32Array(arg)); | 83 static Float32Array _F32(arg) => _wrap(new dom.Float32Array(arg)); |
84 static Float64Array _F64(arg) => _wrap(new dom.Float64Array(arg)); | 84 static Float64Array _F64(arg) => _wrap(new dom.Float64Array(arg)); |
85 static Int8Array _I8(arg) => _wrap(new dom.Int8Array(arg)); | 85 static Int8Array _I8(arg) => _wrap(new dom.Int8Array(arg)); |
86 static Int16Array _I16(arg) => _wrap(new dom.Int16Array(arg)); | 86 static Int16Array _I16(arg) => _wrap(new dom.Int16Array(arg)); |
87 static Int32Array _I32(arg) => _wrap(new dom.Int32Array(arg)); | 87 static Int32Array _I32(arg) => _wrap(new dom.Int32Array(arg)); |
88 static Uint8Array _U8(arg) => _wrap(new dom.Uint8Array(arg)); | 88 static Uint8Array _U8(arg) => _wrap(new dom.Uint8Array(arg)); |
89 static Uint16Array _U16(arg) => _wrap(new dom.Uint16Array(arg)); | 89 static Uint16Array _U16(arg) => _wrap(new dom.Uint16Array(arg)); |
90 static Uint32Array _U32(arg) => _wrap(new dom.Uint32Array(arg)); | 90 static Uint32Array _U32(arg) => _wrap(new dom.Uint32Array(arg)); |
91 static Uint8ClampedArray _U8C(arg) => _wrap(new dom.Uint8ClampedArray(arg)); | 91 static Uint8ClampedArray _U8C(arg) => _wrap(new dom.Uint8ClampedArray(arg)); |
92 | 92 |
93 static Float32Array _F32_2(arg1, arg2) => _wrap(new dom.Float32Array(arg1, arg
2)); | 93 static Float32Array _F32_2(buffer, byteOffset) => _wrap(new dom.Float32Array.f
romBuffer(_unwrap(buffer), byteOffset)); |
94 static Float64Array _F64_2(arg1, arg2) => _wrap(new dom.Float64Array(arg1, arg
2)); | 94 static Float64Array _F64_2(buffer, byteOffset) => _wrap(new dom.Float64Array.f
romBuffer(_unwrap(buffer), byteOffset)); |
95 static Int8Array _I8_2(arg1, arg2) => _wrap(new dom.Int8Array(arg1, arg2)); | 95 static Int8Array _I8_2(buffer, byteOffset) => _wrap(new dom.Int8Array.fromBuff
er(_unwrap(buffer), byteOffset)); |
96 static Int16Array _I16_2(arg1, arg2) => _wrap(new dom.Int16Array(arg1, arg2)); | 96 static Int16Array _I16_2(buffer, byteOffset) => _wrap(new dom.Int16Array.fromB
uffer(_unwrap(buffer), byteOffset)); |
97 static Int32Array _I32_2(arg1, arg2) => _wrap(new dom.Int32Array(arg1, arg2)); | 97 static Int32Array _I32_2(buffer, byteOffset) => _wrap(new dom.Int32Array.fromB
uffer(_unwrap(buffer), byteOffset)); |
98 static Uint8Array _U8_2(arg1, arg2) => _wrap(new dom.Uint8Array(arg1, arg2)); | 98 static Uint8Array _U8_2(buffer, byteOffset) => _wrap(new dom.Uint8Array.fromBu
ffer(_unwrap(buffer), byteOffset)); |
99 static Uint16Array _U16_2(arg1, arg2) => _wrap(new dom.Uint16Array(arg1, arg2)
); | 99 static Uint16Array _U16_2(buffer, byteOffset) => _wrap(new dom.Uint16Array.fro
mBuffer(_unwrap(buffer), byteOffset)); |
100 static Uint32Array _U32_2(arg1, arg2) => _wrap(new dom.Uint32Array(arg1, arg2)
); | 100 static Uint32Array _U32_2(buffer, byteOffset) => _wrap(new dom.Uint32Array.fro
mBuffer(_unwrap(buffer), byteOffset)); |
101 static Uint8ClampedArray _U8C_2(arg1, arg2) => _wrap(new dom.Uint8ClampedArray
(arg1, arg2)); | 101 static Uint8ClampedArray _U8C_2(buffer, byteOffset) => _wrap(new dom.Uint8Clam
pedArray.fromBuffer(_unwrap(buffer), byteOffset)); |
102 | 102 |
103 static Float32Array _F32_3(arg1, arg2, arg3) => _wrap(new dom.Float32Array(arg
1, arg2, arg3)); | 103 static Float32Array _F32_3(buffer, byteOffset, length) => _wrap(new dom.Float3
2Array.fromBuffer(_unwrap(buffer), byteOffset, length)); |
104 static Float64Array _F64_3(arg1, arg2, arg3) => _wrap(new dom.Float64Array(arg
1, arg2, arg3)); | 104 static Float64Array _F64_3(buffer, byteOffset, length) => _wrap(new dom.Float6
4Array.fromBuffer(_unwrap(buffer), byteOffset, length)); |
105 static Int8Array _I8_3(arg1, arg2, arg3) => _wrap(new dom.Int8Array(arg1, arg2
, arg3)); | 105 static Int8Array _I8_3(buffer, byteOffset, length) => _wrap(new dom.Int8Array.
fromBuffer(_unwrap(buffer), byteOffset, length)); |
106 static Int16Array _I16_3(arg1, arg2, arg3) => _wrap(new dom.Int16Array(arg1, a
rg2, arg3)); | 106 static Int16Array _I16_3(buffer, byteOffset, length) => _wrap(new dom.Int16Arr
ay.fromBuffer(_unwrap(buffer), byteOffset, length)); |
107 static Int32Array _I32_3(arg1, arg2, arg3) => _wrap(new dom.Int32Array(arg1, a
rg2, arg3)); | 107 static Int32Array _I32_3(buffer, byteOffset, length) => _wrap(new dom.Int32Arr
ay.fromBuffer(_unwrap(buffer), byteOffset, length)); |
108 static Uint8Array _U8_3(arg1, arg2, arg3) => _wrap(new dom.Uint8Array(arg1, ar
g2, arg3)); | 108 static Uint8Array _U8_3(buffer, byteOffset, length) => _wrap(new dom.Uint8Arra
y.fromBuffer(_unwrap(buffer), byteOffset, length)); |
109 static Uint16Array _U16_3(arg1, arg2, arg3) => _wrap(new dom.Uint16Array(arg1,
arg2, arg3)); | 109 static Uint16Array _U16_3(buffer, byteOffset, length) => _wrap(new dom.Uint16A
rray.fromBuffer(_unwrap(buffer), byteOffset, length)); |
110 static Uint32Array _U32_3(arg1, arg2, arg3) => _wrap(new dom.Uint32Array(arg1,
arg2, arg3)); | 110 static Uint32Array _U32_3(buffer, byteOffset, length) => _wrap(new dom.Uint32A
rray.fromBuffer(_unwrap(buffer), byteOffset, length)); |
111 static Uint8ClampedArray _U8C_3(arg1, arg2, arg3) => _wrap(new dom.Uint8Clampe
dArray(arg1, arg2, arg3)); | 111 static Uint8ClampedArray _U8C_3(buffer, byteOffset, length) => _wrap(new dom.U
int8ClampedArray.fromBuffer(_unwrap(buffer), byteOffset, length)); |
112 | 112 |
113 static ensureNative(List list) => list; // TODO: make sure. | 113 static ensureNative(List list) => list; // TODO: make sure. |
114 } | 114 } |
115 | 115 |
116 class _PointFactoryProvider { | 116 class _PointFactoryProvider { |
117 | 117 |
118 factory Point(num x, num y) => _wrap(new dom.WebKitPoint(x, y)); | 118 factory Point(num x, num y) => _wrap(new dom.WebKitPoint(x, y)); |
119 } | 119 } |
120 | 120 |
121 class _WebSocketFactoryProvider { | 121 class _WebSocketFactoryProvider { |
122 | 122 |
123 factory WebSocket(String url) => _wrap(new dom.WebSocket(url)); | 123 factory WebSocket(String url) => _wrap(new dom.WebSocket(url)); |
124 } | 124 } |
125 | 125 |
126 class _TextFactoryProvider { | 126 class _TextFactoryProvider { |
127 factory Text(String data) => _document.$dom_createTextNode(data); | 127 factory Text(String data) => _document.$dom_createTextNode(data); |
128 } | 128 } |
OLD | NEW |