| OLD | NEW |
| (Empty) |
| 1 class Utils { | |
| 2 static List convertToList(List list) { | |
| 3 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is
fine w/ it. | |
| 4 final length = list.length; | |
| 5 List result = new List(length); | |
| 6 result.copyFrom(list, 0, 0, length); | |
| 7 return result; | |
| 8 } | |
| 9 | |
| 10 static makeNotImplementedException() { | |
| 11 return const NotImplementedException(); | |
| 12 } | |
| 13 | |
| 14 static window() native "TopLevel_Window"; | |
| 15 | |
| 16 static SendPort spawnDomIsolate(Window window, String entryPoint) native "Util
s_spawnDomIsolate"; | |
| 17 } | |
| 18 | |
| 19 /* | |
| 20 * [NPObjectBase] is native wrapper class injected from embedder's code. | |
| 21 */ | |
| 22 class NPObject extends DOMWrapperBase { | |
| 23 static NPObject retrieve(String key) native "NPObject_retrieve"; | |
| 24 property(String propertyName) native "NPObject_property"; | |
| 25 invoke(String methodName, [ObjectArray args = null]) native "NPObject_invoke"; | |
| 26 | |
| 27 static _createNPObject() => new NPObject._createNPObject(); | |
| 28 NPObject._createNPObject(); | |
| 29 } | |
| 30 | |
| 31 class DOMWindowCrossFrameImplementation extends DOMType implements DOMWindow { | |
| 32 // Fields. | |
| 33 History get history() native "DOMWindow_history_cross_frame_Getter"; | |
| 34 Location get location() native "DOMWindow_location_cross_frame_Getter"; | |
| 35 bool get closed() native "DOMWindow_closed_Getter"; | |
| 36 int get length() native "DOMWindow_length_Getter"; | |
| 37 DOMWindow get opener() native "DOMWindow_opener_Getter"; | |
| 38 DOMWindow get parent() native "DOMWindow_parent_Getter"; | |
| 39 DOMWindow get top() native "DOMWindow_top_Getter"; | |
| 40 | |
| 41 // Methods. | |
| 42 void focus() native "DOMWindow_focus_Callback"; | |
| 43 void blur() native "DOMWindow_blur_Callback"; | |
| 44 void close() native "DOMWindow_close_Callback"; | |
| 45 void postMessage([_arg0, _arg1, _arg2]) native "DOMWindow_postMessage_Callback
"; | |
| 46 | |
| 47 // Implementation support. | |
| 48 static DOMWindowCrossFrameImplementation _createDOMWindowCrossFrameImplementat
ion() => new DOMWindowCrossFrameImplementation._createDOMWindowCrossFrameImpleme
ntation(); | |
| 49 DOMWindowCrossFrameImplementation._createDOMWindowCrossFrameImplementation(); | |
| 50 | |
| 51 String get typeName() => "DOMWindow"; | |
| 52 } | |
| 53 | |
| 54 class HistoryCrossFrameImplementation extends DOMType implements History { | |
| 55 // Methods. | |
| 56 void back() native "History_back_Callback"; | |
| 57 void forward() native "History_forward_Callback"; | |
| 58 void go(int distance) native "History_go_Callback"; | |
| 59 | |
| 60 // Implementation support. | |
| 61 static HistoryCrossFrameImplementation _createHistoryCrossFrameImplementation(
) => new HistoryCrossFrameImplementation._createHistoryCrossFrameImplementation(
); | |
| 62 HistoryCrossFrameImplementation._createHistoryCrossFrameImplementation(); | |
| 63 | |
| 64 String get typeName() => "History"; | |
| 65 } | |
| 66 | |
| 67 class LocationCrossFrameImplementation extends DOMType implements Location { | |
| 68 // Fields. | |
| 69 void set href(String) native "Location_href_Setter"; | |
| 70 | |
| 71 // Implementation support. | |
| 72 static LocationCrossFrameImplementation _createLocationCrossFrameImplementatio
n() => new LocationCrossFrameImplementation._createLocationCrossFrameImplementat
ion(); | |
| 73 LocationCrossFrameImplementation._createLocationCrossFrameImplementation(); | |
| 74 | |
| 75 String get typeName() => "Location"; | |
| 76 } | |
| OLD | NEW |