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

Unified Diff: tools/dom/templates/html/dartium/html_dartium.darttemplate

Issue 1392723003: Switch dart:html objects not to be NativeFieldWrapper subclasses with JsInterop (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index cd9f49c4e7aead3e4d1169559f7c8bd79ee9679d..e5e5e33609965c0d0086ba15144a734b30fe1ad7 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -361,10 +361,14 @@ Rectangle make_dart_rectangle(r) =>
js.JsNative.getProperty(r, 'width'),
js.JsNative.getProperty(r, 'height'));
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2. Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
+/// An abstract class for all DOM objects we wrap in dart:html and related
+/// libraries.
+class DartHtmlDomObject {
+
+ /// The underlying JS DOM object.
+ js.JsObject blink_jsObject;
+
+}
// Flag to disable JS interop asserts. Setting to false will speed up the
// wrap_jso calls.
@@ -686,7 +690,7 @@ createCustomUpgrader(Type customElementClass, $this) {
} finally {
// Need to remember the Dart class that was created for this custom so
// return it and setup the blink_jsObject to the $this that we'll be working
- // with as we talk to blink.
+ // with as we talk to blink.
js.setDartHtmlWrapperFor($this, dartClass);
}
@@ -694,7 +698,7 @@ createCustomUpgrader(Type customElementClass, $this) {
}
$else
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
+class DartHtmlDomObject extends NativeFieldWrapperClass2 {}
unwrap_jso(dartClass_instance) => dartClass_instance;
wrap_jso(jsObject) => jsObject;
« no previous file with comments | « tools/dom/src/native_DOMImplementation.dart ('k') | tools/dom/templates/html/dartium/svg_dartium.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698