Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: lib/dom/src/native_DOMImplementation.dart

Issue 10080008: Do not delete DOMStringMap and DOMStringList types from idl database. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added empty DOMStringList implementation. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/dom/src/DOMStringMap.dart ('k') | lib/dom/templates/dom/native/dom_public.darttemplate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « lib/dom/src/DOMStringMap.dart ('k') | lib/dom/templates/dom/native/dom_public.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698