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

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

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_Element.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 part of html; 5 part of html;
6 6
7 class _Utils { 7 class _Utils {
8 static double dateTimeToDouble(DateTime dateTime) => 8 static double dateTimeToDouble(DateTime dateTime) =>
9 dateTime.millisecondsSinceEpoch.toDouble(); 9 dateTime.millisecondsSinceEpoch.toDouble();
10 static DateTime doubleToDateTime(double dateTime) { 10 static DateTime doubleToDateTime(double dateTime) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 _DOMStringMap.internal(); 119 _DOMStringMap.internal();
120 120
121 bool containsValue(String value) => Maps.containsValue(this, value); 121 bool containsValue(String value) => Maps.containsValue(this, value);
122 bool containsKey(String key) native "DOMStringMap_containsKey_Callback"; 122 bool containsKey(String key) native "DOMStringMap_containsKey_Callback";
123 String operator [](String key) native "DOMStringMap_item_Callback"; 123 String operator [](String key) native "DOMStringMap_item_Callback";
124 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack"; 124 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack";
125 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent); 125 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent);
126 String remove(String key) native "DOMStringMap_remove_Callback"; 126 String remove(String key) native "DOMStringMap_remove_Callback";
127 void clear() => Maps.clear(this); 127 void clear() => Maps.clear(this);
128 void forEach(void f(String key, String value)) => Maps.forEach(this, f); 128 void forEach(void f(String key, String value)) => Maps.forEach(this, f);
129 Collection<String> get keys native "DOMStringMap_getKeys_Callback"; 129 Iterable<String> get keys native "DOMStringMap_getKeys_Callback";
130 Collection<String> get values => Maps.getValues(this); 130 Iterable<String> get values => Maps.getValues(this);
131 int get length => Maps.length(this); 131 int get length => Maps.length(this);
132 bool get isEmpty => Maps.isEmpty(this); 132 bool get isEmpty => Maps.isEmpty(this);
133 } 133 }
134 134
135 final Future<SendPort> __HELPER_ISOLATE_PORT = 135 final Future<SendPort> __HELPER_ISOLATE_PORT =
136 spawnDomFunction(_helperIsolateMain); 136 spawnDomFunction(_helperIsolateMain);
137 137
138 // Tricky part. 138 // Tricky part.
139 // Once __HELPER_ISOLATE_PORT gets resolved, it will still delay in .then 139 // Once __HELPER_ISOLATE_PORT gets resolved, it will still delay in .then
140 // and to delay Timer.run is used. However, Timer.run will try to register 140 // and to delay Timer.run is used. However, Timer.run will try to register
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 _send(msg) { 242 _send(msg) {
243 _sendToHelperIsolate(msg, _sendPort); 243 _sendToHelperIsolate(msg, _sendPort);
244 } 244 }
245 } 245 }
246 246
247 get _pureIsolateTimerFactoryClosure => 247 get _pureIsolateTimerFactoryClosure =>
248 ((int milliSeconds, void callback(Timer time), bool repeating) => 248 ((int milliSeconds, void callback(Timer time), bool repeating) =>
249 new _PureIsolateTimer(milliSeconds, callback, repeating)); 249 new _PureIsolateTimer(milliSeconds, callback, repeating));
OLDNEW
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698