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

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

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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: client/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/client/dom/templates/html/dartium/html_dartium.darttemplate b/client/dom/templates/html/dartium/html_dartium.darttemplate
new file mode 100644
index 0000000000000000000000000000000000000000..f51fa563b19b84c78b4bd00ed5ceed51d783ecf0
--- /dev/null
+++ b/client/dom/templates/html/dartium/html_dartium.darttemplate
@@ -0,0 +1,84 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// DO NOT EDIT
+// Auto-generated dart:html library.
nweiz 2012/03/01 21:18:03 This is a template, so it's not actually generated
+
+#library("html");
+
+#import('dart:dom', prefix:'dom');
+
+$!GENERATED_DART_FILES
+
+#source('../dom/src/EventListener.dart');
+#source('../dom/src/KeyLocation.dart');
+#source('../dom/src/KeyName.dart');
+#source('../dom/src/ReadyState.dart');
+#source('../dom/src/TimeoutHandler.dart');
+#source('../dom/src/_Collections.dart');
+#source('../html/src/shared_FactoryProviders.dart');
+#source('../html/src/dartium_FactoryProviders.dart');
+#source('../html/src/Measurement.dart');
+#source('../html/src/Device.dart');
+#source('../html/src/_Testing.dart');
+#source('../html/src/_DOMTypeBase.dart');
+#source('../dom/src/_ListIterators.dart');
+#source('../dom/src/_Lists.dart');
+
+_WindowImpl __window;
+_DocumentImpl __document;
+
+void _initialize() {
+ __window = _wrap(dom.window);
+ __document = _wrap(dom.document.documentElement);
+}
+
+Window get window() {
+ if (__window == null) {
+ _initialize();
+ }
+ return __window;
+}
+
+Document get document() {
+ if (__document == null) {
+ _initialize();
+ }
+ return __document;
+}
+
+_WindowImpl get _window() {
+ if (__window == null) {
+ _initialize();
+ }
+ return __window;
+}
+
+_DocumentImpl get _document() {
+ if (__document == null) {
+ _initialize();
+ }
+ return __document;
+}
+
+_unwrap(raw) {
+ return raw is _DOMTypeBase ? raw._ptr : raw;
+}
+
+// Warning: does not attempt wrap event listeners.
+_wrap(raw) {
+ if (raw is! dom.DOMType) return raw;
+ dom.DOMType domObject = raw;
+ if (domObject.dartObjectLocalStorage != null)
+ return domObject.dartObjectLocalStorage;
+ switch(domObject.typeName) {
+ case 'HTMLDocument':
+ throw 'A document should never be wrapped directly. TODO(jacobr) XXX';
+ case 'HTMLHtmlElement':
+ return new _DocumentImpl._wrap(domObject);
+$WRAPCASES
+ default:
+ throw 'Unrecognized object $domObject. Name=${domObject.typeName}';
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698