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

Side by Side Diff: sdk/lib/html/src/native_DOMImplementation.dart

Issue 11642035: Renaming Window to WindowBase and LocalWindow to Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 part of html; 5 part of html;
6 6
7 class _Utils { 7 class _Utils {
8 static List convertToList(List list) { 8 static List convertToList(List list) {
9 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it. 9 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
10 final length = list.length; 10 final length = list.length;
(...skipping 29 matching lines...) Expand all
40 static bool shadowRootSupported(Document document) native "Utils_shadowRootSup ported"; 40 static bool shadowRootSupported(Document document) native "Utils_shadowRootSup ported";
41 } 41 }
42 42
43 class _NPObject extends NativeFieldWrapperClass1 { 43 class _NPObject extends NativeFieldWrapperClass1 {
44 _NPObject.internal(); 44 _NPObject.internal();
45 static _NPObject retrieve(String key) native "NPObject_retrieve"; 45 static _NPObject retrieve(String key) native "NPObject_retrieve";
46 property(String propertyName) native "NPObject_property"; 46 property(String propertyName) native "NPObject_property";
47 invoke(String methodName, [List args = null]) native "NPObject_invoke"; 47 invoke(String methodName, [List args = null]) native "NPObject_invoke";
48 } 48 }
49 49
50 class _DOMWindowCrossFrame extends NativeFieldWrapperClass1 implements Window { 50 class _DOMWindowCrossFrame extends NativeFieldWrapperClass1 implements
51 WindowBase {
51 _DOMWindowCrossFrame.internal(); 52 _DOMWindowCrossFrame.internal();
52 53
53 // Fields. 54 // Fields.
54 History get history native "DOMWindow_history_cross_frame_Getter"; 55 HistoryBase get history native "DOMWindow_history_cross_frame_Getter";
55 Location get location native "DOMWindow_location_cross_frame_Getter"; 56 LocationBase get location native "DOMWindow_location_cross_frame_Getter";
56 bool get closed native "DOMWindow_closed_Getter"; 57 bool get closed native "DOMWindow_closed_Getter";
57 int get length native "DOMWindow_length_Getter"; 58 int get length native "DOMWindow_length_Getter";
58 Window get opener native "DOMWindow_opener_Getter"; 59 WindowBase get opener native "DOMWindow_opener_Getter";
59 Window get parent native "DOMWindow_parent_Getter"; 60 WindowBase get parent native "DOMWindow_parent_Getter";
60 Window get top native "DOMWindow_top_Getter"; 61 WindowBase get top native "DOMWindow_top_Getter";
61 62
62 // Methods. 63 // Methods.
63 void close() native "DOMWindow_close_Callback"; 64 void close() native "DOMWindow_close_Callback";
64 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) native "DOMWindow_postMessage_Callback"; 65 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) native "DOMWindow_postMessage_Callback";
65 66
66 // Implementation support. 67 // Implementation support.
67 String get typeName => "DOMWindow"; 68 String get typeName => "DOMWindow";
68 } 69 }
69 70
70 class _HistoryCrossFrame extends NativeFieldWrapperClass1 implements History { 71 class _HistoryCrossFrame extends NativeFieldWrapperClass1 implements HistoryBase {
71 _HistoryCrossFrame.internal(); 72 _HistoryCrossFrame.internal();
72 73
73 // Methods. 74 // Methods.
74 void back() native "History_back_Callback"; 75 void back() native "History_back_Callback";
75 void forward() native "History_forward_Callback"; 76 void forward() native "History_forward_Callback";
76 void go(int distance) native "History_go_Callback"; 77 void go(int distance) native "History_go_Callback";
77 78
78 // Implementation support. 79 // Implementation support.
79 String get typeName => "History"; 80 String get typeName => "History";
80 } 81 }
81 82
82 class _LocationCrossFrame extends NativeFieldWrapperClass1 implements Location { 83 class _LocationCrossFrame extends NativeFieldWrapperClass1 implements LocationBa se {
83 _LocationCrossFrame.internal(); 84 _LocationCrossFrame.internal();
84 85
85 // Fields. 86 // Fields.
86 void set href(String) native "Location_href_Setter"; 87 void set href(String) native "Location_href_Setter";
87 88
88 // Implementation support. 89 // Implementation support.
89 String get typeName => "Location"; 90 String get typeName => "Location";
90 } 91 }
91 92
92 class _DOMStringMap extends NativeFieldWrapperClass1 implements Map<String, Stri ng> { 93 class _DOMStringMap extends NativeFieldWrapperClass1 implements Map<String, Stri ng> {
(...skipping 13 matching lines...) Expand all
106 bool get isEmpty => Maps.isEmpty(this); 107 bool get isEmpty => Maps.isEmpty(this);
107 } 108 }
108 109
109 get _printClosure => (s) { 110 get _printClosure => (s) {
110 try { 111 try {
111 window.console.log(s); 112 window.console.log(s);
112 } catch (_) { 113 } catch (_) {
113 _Utils.print(s); 114 _Utils.print(s);
114 } 115 }
115 }; 116 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698