| 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 Utils { | 5 class Utils { |
| 6 static List convertToList(List list) { | 6 static List convertToList(List list) { |
| 7 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is
fine w/ it. | 7 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is
fine w/ it. |
| 8 final length = list.length; | 8 final length = list.length; |
| 9 List result = new List(length); | 9 List result = new List(length); |
| 10 result.copyFrom(list, 0, 0, length); | 10 result.copyFrom(list, 0, 0, length); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Fields. | 72 // Fields. |
| 73 void set href(String) native "Location_href_Setter"; | 73 void set href(String) native "Location_href_Setter"; |
| 74 | 74 |
| 75 // Implementation support. | 75 // Implementation support. |
| 76 static LocationCrossFrameImplementation _createLocationCrossFrameImplementatio
n() => new LocationCrossFrameImplementation._createLocationCrossFrameImplementat
ion(); | 76 static LocationCrossFrameImplementation _createLocationCrossFrameImplementatio
n() => new LocationCrossFrameImplementation._createLocationCrossFrameImplementat
ion(); |
| 77 LocationCrossFrameImplementation._createLocationCrossFrameImplementation(); | 77 LocationCrossFrameImplementation._createLocationCrossFrameImplementation(); |
| 78 | 78 |
| 79 String get typeName() => "Location"; | 79 String get typeName() => "Location"; |
| 80 } | 80 } |
| 81 | 81 |
| 82 class DOMStringMapImplementation extends DOMWrapperBase implements Map<String, S
tring> { | 82 class DOMStringMapImplementation extends DOMWrapperBase implements DOMStringMap
{ |
| 83 static DOMStringMapImplementation _createDOMStringMapImplementation() => new D
OMStringMapImplementation._createDOMStringMapImplementation(); | 83 static DOMStringMapImplementation _createDOMStringMapImplementation() => new D
OMStringMapImplementation._createDOMStringMapImplementation(); |
| 84 DOMStringMapImplementation._createDOMStringMapImplementation(); | 84 DOMStringMapImplementation._createDOMStringMapImplementation(); |
| 85 | 85 |
| 86 bool containsValue(String value) => Maps.containsValue(this, value); | 86 bool containsValue(String value) => Maps.containsValue(this, value); |
| 87 bool containsKey(String key) native "DOMStringMap_containsKey_Callback"; | 87 bool containsKey(String key) native "DOMStringMap_containsKey_Callback"; |
| 88 String operator [](String key) native "DOMStringMap_item_Callback"; | 88 String operator [](String key) native "DOMStringMap_item_Callback"; |
| 89 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb
ack"; | 89 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb
ack"; |
| 90 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke
y, ifAbsent); | 90 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke
y, ifAbsent); |
| 91 String remove(String key) native "DOMStringMap_remove_Callback"; | 91 String remove(String key) native "DOMStringMap_remove_Callback"; |
| 92 void clear() => Maps.clear(this); | 92 void clear() => Maps.clear(this); |
| 93 void forEach(void f(String key, String value)) => Maps.forEach(this, f); | 93 void forEach(void f(String key, String value)) => Maps.forEach(this, f); |
| 94 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback"; | 94 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback"; |
| 95 Collection<String> getValues() => Maps.getValues(this); | 95 Collection<String> getValues() => Maps.getValues(this); |
| 96 int get length() => Maps.length(this); | 96 int get length() => Maps.length(this); |
| 97 bool isEmpty() => Maps.isEmpty(this); | 97 bool isEmpty() => Maps.isEmpty(this); |
| 98 } | 98 } |
| 99 |
| 100 class DOMStringListImplementation extends DOMWrapperBase implements DOMStringLis
t { |
| 101 static DOMStringListImplementation _createDOMStringListImplementation() => new
DOMStringListImplementation._createDOMStringListImplementation(); |
| 102 DOMStringListImplementation._createDOMStringListImplementation(); |
| 103 |
| 104 // FIXME: provide implementation. |
| 105 } |
| OLD | NEW |