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

Side by Side Diff: lib/dom/templates/html/dartium/html_dartium.darttemplate

Issue 10383302: Move dart:dom implementation classes to dart:html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // DO NOT EDIT 5 // DO NOT EDIT
6 // Auto-generated dart:html library. 6 // Auto-generated dart:html library.
7 7
8 #library("html"); 8 #library("html");
9 9
10 #import('dart:dom_deprecated', prefix:'dom'); 10 #import("dart:isolate");
11 #import("dart:nativewrappers");
11 12
12 $!GENERATED_DART_FILES 13 $!GENERATED_DART_FILES
13 14
14 #source('$AUXILIARY_DIR/EventListener.dart'); 15 #source('$AUXILIARY_DIR/EventListener.dart');
15 #source('$AUXILIARY_DIR/KeyLocation.dart'); 16 #source('$AUXILIARY_DIR/KeyLocation.dart');
16 #source('$AUXILIARY_DIR/KeyName.dart'); 17 #source('$AUXILIARY_DIR/KeyName.dart');
17 #source('$AUXILIARY_DIR/ReadyState.dart'); 18 #source('$AUXILIARY_DIR/ReadyState.dart');
18 #source('$AUXILIARY_DIR/_Collections.dart'); 19 #source('$AUXILIARY_DIR/_Collections.dart');
19 #source('$AUXILIARY_DIR/_XMLHttpRequestUtils.dart'); 20 #source('$AUXILIARY_DIR/_XMLHttpRequestUtils.dart');
20 #source('$AUXILIARY_DIR/../../html/src/shared_FactoryProviders.dart'); 21 #source('$AUXILIARY_DIR/../../html/src/shared_FactoryProviders.dart');
21 #source('$AUXILIARY_DIR/../../html/src/dartium_FactoryProviders.dart'); 22 #source('$AUXILIARY_DIR/../../html/src/dartium_FactoryProviders.dart');
22 #source('$AUXILIARY_DIR/../../html/src/Measurement.dart'); 23 #source('$AUXILIARY_DIR/../../html/src/Measurement.dart');
23 #source('$AUXILIARY_DIR/../../html/src/Device.dart'); 24 #source('$AUXILIARY_DIR/../../html/src/Device.dart');
24 #source('$AUXILIARY_DIR/../../html/src/_Testing.dart'); 25 #source('$AUXILIARY_DIR/../../html/src/_Testing.dart');
25 #source('$AUXILIARY_DIR/../../html/src/_DOMTypeBase.dart'); 26 #source('$AUXILIARY_DIR/../../html/src/_DOMTypeBase.dart');
26 #source('$AUXILIARY_DIR/_ListIterators.dart'); 27 #source('$AUXILIARY_DIR/_ListIterators.dart');
27 #source('$AUXILIARY_DIR/_Lists.dart'); 28 #source('$AUXILIARY_DIR/_Lists.dart');
28 29
30 #source('$AUXILIARY_DIR/native_DOMWrapperBase.dart');
31 #source('$AUXILIARY_DIR/native_DOMPublic.dart');
32 #source('$AUXILIARY_DIR/native_DOMImplementation.dart');
33
29 _WindowImpl __window; 34 _WindowImpl __window;
30 _DocumentImpl __document; 35 _DocumentImpl __document;
31 36
32 void _initialize() { 37 void _initialize() {
33 __window = _wrap(dom.window); 38 __window = _wrap(_Utils.window());
34 __document = _wrap(dom.document); 39 __document = _wrap(_Utils.window().document);
35 } 40 }
36 41
37 Window get window() { 42 Window get window() {
38 if (__window == null) { 43 if (__window == null) {
39 _initialize(); 44 _initialize();
40 } 45 }
41 return __window; 46 return __window;
42 } 47 }
43 48
44 Document get document() { 49 Document get document() {
(...skipping 14 matching lines...) Expand all
59 if (__document == null) { 64 if (__document == null) {
60 _initialize(); 65 _initialize();
61 } 66 }
62 return __document; 67 return __document;
63 } 68 }
64 69
65 _unwrap(raw) { 70 _unwrap(raw) {
66 return raw is _DOMTypeBase ? raw._ptr : raw; 71 return raw is _DOMTypeBase ? raw._ptr : raw;
67 } 72 }
68 73
69 unwrap_internal(raw) => _unwrap(raw);
70
71 // Warning: does not attempt wrap event listeners. 74 // Warning: does not attempt wrap event listeners.
72 _wrap(raw) { 75 _wrap(raw) {
73 if (raw is! dom.DOMType) return raw; 76 if (raw is! _DOMWrapperBase) return raw;
74 dom.DOMType domObject = raw; 77 _DOMWrapperBase domObject = raw;
75 if (domObject.dartObjectLocalStorage != null) 78 if (domObject.dartObjectLocalStorage != null)
76 return domObject.dartObjectLocalStorage; 79 return domObject.dartObjectLocalStorage;
77 switch(domObject.typeName) { 80 switch(domObject.typeName) {
78 case 'HTMLElement': 81 case 'HTMLElement':
79 return new _UnknownElementImpl._wrap(domObject); 82 return new _UnknownElementImpl._wrap(domObject);
80 $WRAPCASES 83 $WRAPCASES
81 case 'HTMLDocument': 84 case 'HTMLDocument':
82 return new _DocumentImpl._wrap(domObject); 85 return new _DocumentImpl._wrap(domObject);
83 default: 86 default:
84 throw 'Unrecognized object $domObject. Name=${domObject.typeName}'; 87 throw 'Unrecognized object $domObject. Name=${domObject.typeName}';
85 } 88 }
86 } 89 }
87
88 wrap_internal(raw) => _wrap(raw);
89
90 spawnDomIsolate(Window targetWindow, String entryPoint) =>
91 dom.spawnDomIsolate(_unwrap(targetWindow), entryPoint);
92
93 dom.LayoutTestController get layoutTestController() =>
94 dom.layoutTestController;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698