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

Side by Side Diff: client/dom/frog/dom_frog.dart

Issue 9453004: Cross frame access tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final pass of comments, update of status 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/dom/generated/src/frog/DOMWindow.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #library('dom'); 1 #library('dom');
2 2
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 6
7 // DO NOT EDIT 7 // DO NOT EDIT
8 // Auto-generated Dart DOM library. 8 // Auto-generated Dart DOM library.
9 9
10 10
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 String defaultStatus; 1198 String defaultStatus;
1199 1199
1200 String defaultstatus; 1200 String defaultstatus;
1201 1201
1202 final num devicePixelRatio; 1202 final num devicePixelRatio;
1203 1203
1204 final _DocumentJs document; 1204 final _DocumentJs document;
1205 1205
1206 final _EventJs event; 1206 final _EventJs event;
1207 1207
1208 final _ElementJs frameElement;
1209
1210 final _DOMWindowJs frames; 1208 final _DOMWindowJs frames;
1211 1209
1212 final _HistoryJs history; 1210 final _HistoryJs history;
1213 1211
1214 final int innerHeight; 1212 final int innerHeight;
1215 1213
1216 final int innerWidth; 1214 final int innerWidth;
1217 1215
1218 final int length; 1216 final int length;
1219 1217
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2968 2966
2969 String align; 2967 String align;
2970 } 2968 }
2971 2969
2972 class _HTMLHtmlElementJs extends _HTMLElementJs implements HTMLHtmlElement nativ e "*HTMLHtmlElement" { 2970 class _HTMLHtmlElementJs extends _HTMLElementJs implements HTMLHtmlElement nativ e "*HTMLHtmlElement" {
2973 2971
2974 String manifest; 2972 String manifest;
2975 2973
2976 String version; 2974 String version;
2977 } 2975 }
2976 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2977 // for details. All rights reserved. Use of this source code is governed by a
2978 // BSD-style license that can be found in the LICENSE file.
2978 2979
2979 class _HTMLIFrameElementJs extends _HTMLElementJs implements HTMLIFrameElement n ative "*HTMLIFrameElement" { 2980 class _HTMLIFrameElementJs extends _HTMLElementJs implements HTMLIFrameElement n ative "*HTMLIFrameElement" {
2980 2981
2981 String align; 2982 String align;
2982 2983
2983 final _DocumentJs contentDocument;
2984
2985 final _DOMWindowJs contentWindow;
2986
2987 String frameBorder; 2984 String frameBorder;
2988 2985
2989 String height; 2986 String height;
2990 2987
2991 String longDesc; 2988 String longDesc;
2992 2989
2993 String marginHeight; 2990 String marginHeight;
2994 2991
2995 String marginWidth; 2992 String marginWidth;
2996 2993
2997 String name; 2994 String name;
2998 2995
2999 String sandbox; 2996 String sandbox;
3000 2997
3001 String scrolling; 2998 String scrolling;
3002 2999
3003 String src; 3000 String src;
3004 3001
3005 String width; 3002 String width;
3006 3003
3007 _SVGDocumentJs getSVGDocument() native; 3004 _SVGDocumentJs getSVGDocument() native;
3005
3006
3007 Window get _contentWindow() native "return this.contentWindow;";
3008
3009 // Override contentWindow to return secure wrapper.
3010 Window get contentWindow() {
3011 return _DOMWindowCrossFrameImpl._createSafe(_contentWindow);
3012 }
3013 }
3014
3015 // TODO(vsm): Unify with Dartium version.
3016 class _DOMWindowCrossFrameImpl implements DOMType, DOMWindow {
3017 // Private window.
3018 _DOMWindowJs _window;
3019
3020 // DOMType
3021 var dartObjectLocalStorage;
3022 String get typeName() => "DOMWindow";
3023
3024 // Fields.
3025 // TODO(vsm): Wrap these two.
3026 History get history() => _window.history;
3027 Location get location() => _window.location;
3028
3029 bool get closed() => _window.closed;
3030 int get length() => _window.length;
3031 DOMWindow get opener() => _createDOMWindowCrossFrame(_window.opener);
3032 DOMWindow get parent() => _createDOMWindowCrossFrame(_window.parent);
3033 DOMWindow get top() => _createDOMWindowCrossFrame(_window.top);
3034
3035 // Methods.
3036 void focus() {
3037 _window.focus();
3038 }
3039
3040 void blur() {
3041 _window.blur();
3042 }
3043
3044 void close() {
3045 _window.close();
3046 }
3047
3048 void postMessage(Dynamic message,
3049 String targetOrigin,
3050 [List messagePorts = null]) {
3051 if (messagePorts == null) {
3052 _window.postMessage(message, targetOrigin);
3053 } else {
3054 _window.postMessage(message, targetOrigin, messagePorts);
3055 }
3056 }
3057
3058 // Implementation support.
3059 _DOMWindowCrossFrameImpl(this._window);
3060
3061 static DOMWindow _createSafe(w) {
3062 // TODO(vsm): Check if it's the top-level window. Return unwrapped.
3063
3064 // TODO(vsm): Cache or implement equality.
3065 return new _DOMWindowCrossFrameImpl(w);
3066 }
3008 } 3067 }
3009 3068
3010 class _HTMLImageElementJs extends _HTMLElementJs implements HTMLImageElement nat ive "*HTMLImageElement" { 3069 class _HTMLImageElementJs extends _HTMLElementJs implements HTMLImageElement nat ive "*HTMLImageElement" {
3011 3070
3012 String align; 3071 String align;
3013 3072
3014 String alt; 3073 String alt;
3015 3074
3016 String border; 3075 String border;
3017 3076
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 _IDBObjectStoreJs createObjectStore(String name) native; 4097 _IDBObjectStoreJs createObjectStore(String name) native;
4039 4098
4040 void deleteObjectStore(String name) native; 4099 void deleteObjectStore(String name) native;
4041 4100
4042 bool dispatchEvent(_EventJs evt) native; 4101 bool dispatchEvent(_EventJs evt) native;
4043 4102
4044 void removeEventListener(String type, EventListener listener, [bool useCapture = null]) native; 4103 void removeEventListener(String type, EventListener listener, [bool useCapture = null]) native;
4045 4104
4046 _IDBVersionChangeRequestJs setVersion(String version) native; 4105 _IDBVersionChangeRequestJs setVersion(String version) native;
4047 4106
4048 _IDBTransactionJs transaction(String storeName, [int mode = null]) native; 4107 _IDBTransactionJs transaction(String storeName, int mode) native;
4049 } 4108 }
4050 4109
4051 class _IDBDatabaseErrorJs extends _DOMTypeJs implements IDBDatabaseError native "*IDBDatabaseError" { 4110 class _IDBDatabaseErrorJs extends _DOMTypeJs implements IDBDatabaseError native "*IDBDatabaseError" {
4052 4111
4053 int code; 4112 int code;
4054 4113
4055 String message; 4114 String message;
4056 } 4115 }
4057 4116
4058 class _IDBDatabaseExceptionJs extends _DOMTypeJs implements IDBDatabaseException native "*IDBDatabaseException" { 4117 class _IDBDatabaseExceptionJs extends _DOMTypeJs implements IDBDatabaseException native "*IDBDatabaseException" {
(...skipping 12399 matching lines...) Expand 10 before | Expand all | Expand 10 after
16458 IDBObjectStore createObjectStore(String name); 16517 IDBObjectStore createObjectStore(String name);
16459 16518
16460 void deleteObjectStore(String name); 16519 void deleteObjectStore(String name);
16461 16520
16462 bool dispatchEvent(Event evt); 16521 bool dispatchEvent(Event evt);
16463 16522
16464 void removeEventListener(String type, EventListener listener, [bool useCapture ]); 16523 void removeEventListener(String type, EventListener listener, [bool useCapture ]);
16465 16524
16466 IDBVersionChangeRequest setVersion(String version); 16525 IDBVersionChangeRequest setVersion(String version);
16467 16526
16468 IDBTransaction transaction(String storeName, [int mode]); 16527 IDBTransaction transaction(String storeName, int mode);
16469 } 16528 }
16470 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 16529 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
16471 // for details. All rights reserved. Use of this source code is governed by a 16530 // for details. All rights reserved. Use of this source code is governed by a
16472 // BSD-style license that can be found in the LICENSE file. 16531 // BSD-style license that can be found in the LICENSE file.
16473 16532
16474 // WARNING: Do not edit - generated code. 16533 // WARNING: Do not edit - generated code.
16475 16534
16476 interface IDBDatabaseError { 16535 interface IDBDatabaseError {
16477 16536
16478 int code; 16537 int code;
(...skipping 7597 matching lines...) Expand 10 before | Expand all | Expand 10 after
24076 if (length < 0) throw new IllegalArgumentException('length'); 24135 if (length < 0) throw new IllegalArgumentException('length');
24077 if (start < 0) throw new IndexOutOfRangeException(start); 24136 if (start < 0) throw new IndexOutOfRangeException(start);
24078 int end = start + length; 24137 int end = start + length;
24079 if (end > a.length) throw new IndexOutOfRangeException(end); 24138 if (end > a.length) throw new IndexOutOfRangeException(end);
24080 for (int i = start; i < end; i++) { 24139 for (int i = start; i < end; i++) {
24081 accumulator.add(a[i]); 24140 accumulator.add(a[i]);
24082 } 24141 }
24083 return accumulator; 24142 return accumulator;
24084 } 24143 }
24085 } 24144 }
OLDNEW
« no previous file with comments | « no previous file | client/dom/generated/src/frog/DOMWindow.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698