Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 bool get closed() native "DOMWindow_closed_Getter"; | 55 bool get closed() native "DOMWindow_closed_Getter"; |
| 56 int get length() native "DOMWindow_length_Getter"; | 56 int get length() native "DOMWindow_length_Getter"; |
| 57 DOMWindow get opener() native "DOMWindow_opener_Getter"; | 57 DOMWindow get opener() native "DOMWindow_opener_Getter"; |
| 58 DOMWindow get parent() native "DOMWindow_parent_Getter"; | 58 DOMWindow get parent() native "DOMWindow_parent_Getter"; |
| 59 DOMWindow get top() native "DOMWindow_top_Getter"; | 59 DOMWindow get top() native "DOMWindow_top_Getter"; |
| 60 | 60 |
| 61 // Methods. | 61 // Methods. |
| 62 void focus() native "DOMWindow_focus_Callback"; | 62 void focus() native "DOMWindow_focus_Callback"; |
| 63 void blur() native "DOMWindow_blur_Callback"; | 63 void blur() native "DOMWindow_blur_Callback"; |
| 64 void close() native "DOMWindow_close_Callback"; | 64 void close() native "DOMWindow_close_Callback"; |
| 65 void postMessage([_arg0, _arg1, _arg2]) native "DOMWindow_postMessage_Callback "; | 65 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) native "DOMWindow_postMessage_Callback"; |
|
Anton Muhin
2012/05/18 10:53:17
just copied from generated interface.
| |
| 66 | 66 |
| 67 // Implementation support. | 67 // Implementation support. |
| 68 static DOMWindowCrossFrameImplementation _createDOMWindowCrossFrameImplementat ion() => new DOMWindowCrossFrameImplementation._createDOMWindowCrossFrameImpleme ntation(); | 68 static DOMWindowCrossFrameImplementation _createDOMWindowCrossFrameImplementat ion() => new DOMWindowCrossFrameImplementation._createDOMWindowCrossFrameImpleme ntation(); |
| 69 DOMWindowCrossFrameImplementation._createDOMWindowCrossFrameImplementation(); | 69 DOMWindowCrossFrameImplementation._createDOMWindowCrossFrameImplementation(); |
| 70 | 70 |
| 71 String get typeName() => "DOMWindow"; | 71 String get typeName() => "DOMWindow"; |
| 72 } | 72 } |
| 73 | 73 |
| 74 class HistoryCrossFrameImplementation extends DOMWrapperBase implements History { | 74 class HistoryCrossFrameImplementation extends DOMWrapperBase implements History { |
| 75 // Methods. | 75 // Methods. |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 105 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack"; | 105 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack"; |
| 106 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent); | 106 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent); |
| 107 String remove(String key) native "DOMStringMap_remove_Callback"; | 107 String remove(String key) native "DOMStringMap_remove_Callback"; |
| 108 void clear() => Maps.clear(this); | 108 void clear() => Maps.clear(this); |
| 109 void forEach(void f(String key, String value)) => Maps.forEach(this, f); | 109 void forEach(void f(String key, String value)) => Maps.forEach(this, f); |
| 110 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback"; | 110 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback"; |
| 111 Collection<String> getValues() => Maps.getValues(this); | 111 Collection<String> getValues() => Maps.getValues(this); |
| 112 int get length() => Maps.length(this); | 112 int get length() => Maps.length(this); |
| 113 bool isEmpty() => Maps.isEmpty(this); | 113 bool isEmpty() => Maps.isEmpty(this); |
| 114 } | 114 } |
| OLD | NEW |