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

Side by Side Diff: lib/dom/templates/html/frog/impl_Window.darttemplate

Issue 10601003: Enable cross frame window operations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { 5 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
6 6
7 _DocumentImpl get document() native "return this.document;"; 7 _DocumentImpl get document() native "return this.document;";
8 8
9 Window get _top() native "return this.top;"; 9 Window get _top() native "return this.top;";
10 10
11 // Override top to return secure wrapper. 11 // Override top to return secure wrapper.
12 Window get top() => _DOMWindowCrossFrameImpl._createSafe(_top); 12 Window get top() => _DOMWindowCrossFrameImpl._createSafe(_top);
13 13
14 Window _open2(url, name) native "return this.open(url, name);";
15
16 Window _open3(url, name, options) native "return this.open(url, name, options) ;";
sra1 2012/06/21 16:18:01 For consistency, put the main API (open) first and
17
18 Window open(String url, String name, [String options]) {
19 if (options == null) {
20 return _DOMWindowCrossFrameImpl._createSafe(_open2(url, name));
21 } else {
22 return _DOMWindowCrossFrameImpl._createSafe(_open3(url, name, options));
23 }
24 }
14 25
15 // API level getter and setter for Location. 26 // API level getter and setter for Location.
16 // TODO: The cross domain safe wrapper can be inserted here or folded into 27 // TODO: The cross domain safe wrapper can be inserted here or folded into
17 // _LocationWrapper. 28 // _LocationWrapper.
18 Location get location() => _get_location(); 29 Location get location() => _get_location();
19 30
20 // TODO: consider forcing users to do: window.location.assign('string'). 31 // TODO: consider forcing users to do: window.location.assign('string').
21 /** 32 /**
22 * Sets the window's location, which causes the browser to navigate to the new 33 * Sets the window's location, which causes the browser to navigate to the new
23 * location. [value] may be a Location object or a string. 34 * location. [value] may be a Location object or a string.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 '''; 113 ''';
103 114
104 115
105 _IDBFactoryImpl get indexedDB() => _get_indexedDB(); 116 _IDBFactoryImpl get indexedDB() => _get_indexedDB();
106 117
107 _IDBFactoryImpl _get_indexedDB() native 118 _IDBFactoryImpl _get_indexedDB() native
108 'return this.indexedDB || this.webkitIndexedDB || this.mozIndexedDB'; 119 'return this.indexedDB || this.webkitIndexedDB || this.mozIndexedDB';
109 120
110 $!MEMBERS 121 $!MEMBERS
111 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698