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 _IDBKeyRangeFactoryProvider { | 5 class _IDBKeyRangeFactoryProvider { |
6 | 6 |
7 static IDBKeyRange createIDBKeyRange_only(/*IDBKey*/ value) => | 7 static IDBKeyRange createIDBKeyRange_only(/*IDBKey*/ value) => |
8 _only(_class(), _translateKey(value)); | 8 _only(_class(), _translateKey(value)); |
9 | 9 |
10 static IDBKeyRange createIDBKeyRange_lowerBound( | 10 static IDBKeyRange createIDBKeyRange_lowerBound( |
(...skipping 16 matching lines...) Expand all Loading... |
27 return _cachedClass = _uncachedClass(); | 27 return _cachedClass = _uncachedClass(); |
28 } | 28 } |
29 | 29 |
30 static _uncachedClass() => | 30 static _uncachedClass() => |
31 JS('var', | 31 JS('var', |
32 '''window.webkitIDBKeyRange || window.mozIDBKeyRange || | 32 '''window.webkitIDBKeyRange || window.mozIDBKeyRange || |
33 window.msIDBKeyRange || window.IDBKeyRange'''); | 33 window.msIDBKeyRange || window.IDBKeyRange'''); |
34 | 34 |
35 static _translateKey(idbkey) => idbkey; // TODO: fixme. | 35 static _translateKey(idbkey) => idbkey; // TODO: fixme. |
36 | 36 |
37 static _IDBKeyRangeImpl _only(cls, value) => | 37 static IDBKeyRange _only(cls, value) => |
38 JS('_IDBKeyRangeImpl', '#.only(#)', cls, value); | 38 JS('IDBKeyRange', '#.only(#)', cls, value); |
39 | 39 |
40 static _IDBKeyRangeImpl _lowerBound(cls, bound, open) => | 40 static IDBKeyRange _lowerBound(cls, bound, open) => |
41 JS('_IDBKeyRangeImpl', '#.lowerBound(#, #)', cls, bound, open); | 41 JS('IDBKeyRange', '#.lowerBound(#, #)', cls, bound, open); |
42 | 42 |
43 static _IDBKeyRangeImpl _upperBound(cls, bound, open) => | 43 static IDBKeyRange _upperBound(cls, bound, open) => |
44 JS('_IDBKeyRangeImpl', '#.upperBound(#, #)', cls, bound, open); | 44 JS('IDBKeyRange', '#.upperBound(#, #)', cls, bound, open); |
45 | 45 |
46 static _IDBKeyRangeImpl _bound(cls, lower, upper, lowerOpen, upperOpen) => | 46 static IDBKeyRange _bound(cls, lower, upper, lowerOpen, upperOpen) => |
47 JS('_IDBKeyRangeImpl', '#.bound(#, #, #, #)', | 47 JS('IDBKeyRange', '#.bound(#, #, #, #)', |
48 cls, lower, upper, lowerOpen, upperOpen); | 48 cls, lower, upper, lowerOpen, upperOpen); |
49 } | 49 } |
OLD | NEW |