Index: tools/dom/src/html_native_DOMImplementation.dart |
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/html_native_DOMImplementation.dart |
similarity index 91% |
copy from tools/dom/src/native_DOMImplementation.dart |
copy to tools/dom/src/html_native_DOMImplementation.dart |
index d8c4edc808c2dca027d1e8b4ee61a7a0c39124c9..697a0b99f86213104fcb16cc7cb0ff48d8143a95 100644 |
--- a/tools/dom/src/native_DOMImplementation.dart |
+++ b/tools/dom/src/html_native_DOMImplementation.dart |
@@ -105,11 +105,11 @@ class _Utils { |
return element; |
} |
- static window() native "Utils_window"; |
- static forwardingPrint(String message) native "Utils_forwardingPrint"; |
+ static window() => blink.Native_Utils_window(); |
+ static forwardingPrint(String message) => blink.Native_Utils_forwardingPrint(message); |
// TODO(vsm): Make this API compatible with spawnUri. It should also |
// return a Future<Isolate>. |
- static spawnDomUri(String uri) native "Utils_spawnDomUri"; |
+ static spawnDomUri(String uri) => blink.Native_Utils_spawnDomUri(uri); |
// The following methods were added for debugger integration to make working |
// with the Dart C mirrors API simpler. |
@@ -411,13 +411,16 @@ class _Utils { |
} |
static void _register(Document document, String tag, Type customType, |
- String extendsTagName) native "Utils_register"; |
+ String extendsTagName) => blink.Native_Utils_register(document, tag, customType, extendsTagName); |
- static Element createElement(Document document, String tagName) native "Utils_createElement"; |
+ static Element createElement(Document document, String tagName) => |
+ blink.Native_Utils_createElement(document, tagName); |
- static void initializeCustomElement(HtmlElement element) native "Utils_initializeCustomElement"; |
+ static void initializeCustomElement(HtmlElement element) => |
+ blink.Native_Utils_initializeCustomElement(element); |
- static void changeElementWrapper(HtmlElement element, Type type) native "Utils_changeElementWrapper"; |
+ static void changeElementWrapper(HtmlElement element, Type type) => |
+ blink.Native_Utils_changeElementWrapper(element, type); |
} |
class _DOMWindowCrossFrame extends NativeFieldWrapperClass2 implements |
@@ -425,17 +428,17 @@ class _DOMWindowCrossFrame extends NativeFieldWrapperClass2 implements |
_DOMWindowCrossFrame.internal(); |
// Fields. |
- HistoryBase get history native "Window_history_cross_frame_Getter"; |
- LocationBase get location native "Window_location_cross_frame_Getter"; |
- bool get closed native "Window_closed_Getter"; |
- int get length native "Window_length_Getter"; |
- WindowBase get opener native "Window_opener_Getter"; |
- WindowBase get parent native "Window_parent_Getter"; |
- WindowBase get top native "Window_top_Getter"; |
+ HistoryBase get history => blink.Native_DOMWindowCrossFrame_get_history(this); |
+ LocationBase get location => blink.Native_DOMWindowCrossFrame_get_location(this); |
+ bool get closed => blink.Native_DOMWindowCrossFrame_get_closed(this); |
+ WindowBase get opener => blink.Native_DOMWindowCrossFrame_get_opener(this); |
+ WindowBase get parent => blink.Native_DOMWindowCrossFrame_get_parent(this); |
+ WindowBase get top => blink.Native_DOMWindowCrossFrame_get_top(this); |
// Methods. |
- void close() native "Window_close_Callback"; |
- void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) native "Window_postMessage_Callback"; |
+ void close() => blink.Native_DOMWindowCrossFrame_close(this); |
+ void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) => |
+ blink.Native_DOMWindowCrossFrame_postMessage(this, message, targetOrigin, messagePorts); |
// Implementation support. |
String get typeName => "Window"; |
@@ -460,9 +463,9 @@ class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase |
_HistoryCrossFrame.internal(); |
// Methods. |
- void back() native "History_back_Callback"; |
- void forward() native "History_forward_Callback"; |
- void go(int distance) native "History_go_Callback"; |
+ void back() => blink.Native_HistoryCrossFrame_back(this); |
+ void forward() => blink.Native_HistoryCrossFrame_forward(this); |
+ void go(int distance) => blink.Native_HistoryCrossFrame_go(this, distance); |
// Implementation support. |
String get typeName => "History"; |
@@ -472,7 +475,7 @@ class _LocationCrossFrame extends NativeFieldWrapperClass2 implements LocationBa |
_LocationCrossFrame.internal(); |
// Fields. |
- void set href(String) native "Location_href_Setter"; |
+ void set href(String h) => blink.Native_LocationCrossFrame_set_href(this, h); |
// Implementation support. |
String get typeName => "Location"; |
@@ -482,14 +485,14 @@ class _DOMStringMap extends NativeFieldWrapperClass2 implements Map<String, Stri |
_DOMStringMap.internal(); |
bool containsValue(String value) => Maps.containsValue(this, value); |
- bool containsKey(String key) native "DOMStringMap_containsKey_Callback"; |
- String operator [](String key) native "DOMStringMap_item_Callback"; |
- void operator []=(String key, String value) native "DOMStringMap_setItem_Callback"; |
+ bool containsKey(String key) => blink.Native_DOMStringMap_containsKey(this, key); |
+ String operator [](String key) => blink.Native_DOMStringMap_item(this, key); |
+ void operator []=(String key, String value) => blink.Native_DOMStringMap_setItem(this, key, value); |
String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, key, ifAbsent); |
- String remove(String key) native "DOMStringMap_remove_Callback"; |
+ String remove(String key) => blink.Native_DOMStringMap_remove(this, key); |
void clear() => Maps.clear(this); |
void forEach(void f(String key, String value)) => Maps.forEach(this, f); |
- Iterable<String> get keys native "DOMStringMap_getKeys_Callback"; |
+ Iterable<String> get keys => blink.Native_DOMStringMap_get_keys(this, keys); |
Iterable<String> get values => Maps.getValues(this); |
int get length => Maps.length(this); |
bool get isEmpty => Maps.isEmpty(this); |