| 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 _IDBKeyRangeFactoryProvider { |
| 10 |
| 11 factory IDBKeyRange.only(/*IDBKey*/ value) => |
| 12 _wrap(new dom.IDBKeyRange.only(_unwrap(value))); |
| 13 |
| 14 factory IDBKeyRange.lowerBound(/*IDBKey*/ bound, [bool open = false]) => |
| 15 _wrap(new dom.IDBKeyRange.lowerBound(_unwrap(bound), open)); |
| 16 |
| 17 factory IDBKeyRange.upperBound(/*IDBKey*/ bound, [bool open = false]) => |
| 18 _wrap(new dom.IDBKeyRange.upperBound(_unwrap(bound), open)); |
| 19 |
| 20 factory IDBKeyRange.bound(/*IDBKey*/ lower, /*IDBKey*/ upper, |
| 21 [bool lowerOpen = false, bool upperOpen = false]) => |
| 22 _wrap(new dom.IDBKeyRange.bound(_unwrap(lower), _unwrap(upper), |
| 23 lowerOpen, upperOpen)); |
| 24 } |
| 25 |
| 9 class _TypedArrayFactoryProvider { | 26 class _TypedArrayFactoryProvider { |
| 10 | 27 |
| 11 factory Float32Array(int length) => _F32(length); | 28 factory Float32Array(int length) => _F32(length); |
| 12 factory Float32Array.fromList(List<num> list) => _F32_1(ensureNative(list)); | 29 factory Float32Array.fromList(List<num> list) => _F32_1(ensureNative(list)); |
| 13 factory Float32Array.fromBuffer(ArrayBuffer buffer, | 30 factory Float32Array.fromBuffer(ArrayBuffer buffer, |
| 14 [int byteOffset = 0, int length]) { | 31 [int byteOffset = 0, int length]) { |
| 15 if (length == null) return _F32_2(buffer, byteOffset); | 32 if (length == null) return _F32_2(buffer, byteOffset); |
| 16 return _F32_3(buffer, byteOffset, length); | 33 return _F32_3(buffer, byteOffset, length); |
| 17 } | 34 } |
| 18 | 35 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 146 } |
| 130 | 147 |
| 131 class _WebSocketFactoryProvider { | 148 class _WebSocketFactoryProvider { |
| 132 | 149 |
| 133 factory WebSocket(String url) => _wrap(new dom.WebSocket(url)); | 150 factory WebSocket(String url) => _wrap(new dom.WebSocket(url)); |
| 134 } | 151 } |
| 135 | 152 |
| 136 class _TextFactoryProvider { | 153 class _TextFactoryProvider { |
| 137 factory Text(String data) => _document.$dom_createTextNode(data); | 154 factory Text(String data) => _document.$dom_createTextNode(data); |
| 138 } | 155 } |
| OLD | NEW |