| OLD | NEW |
| 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;"; | |
| 10 | |
| 11 // Override top to return secure wrapper. | |
| 12 Window get top => _DOMWindowCrossFrameImpl._createSafe(_top); | |
| 13 | |
| 14 Window _open2(url, name) native "return this.open(url, name);"; | 9 Window _open2(url, name) native "return this.open(url, name);"; |
| 15 | 10 |
| 16 Window _open3(url, name, options) native "return this.open(url, name, options)
;"; | 11 Window _open3(url, name, options) native "return this.open(url, name, options)
;"; |
| 17 | 12 |
| 18 Window open(String url, String name, [String options]) { | 13 Window open(String url, String name, [String options]) { |
| 19 if (options == null) { | 14 if (options == null) { |
| 20 return _DOMWindowCrossFrameImpl._createSafe(_open2(url, name)); | 15 return _DOMWindowCrossFrameImpl._createSafe(_open2(url, name)); |
| 21 } else { | 16 } else { |
| 22 return _DOMWindowCrossFrameImpl._createSafe(_open3(url, name, options)); | 17 return _DOMWindowCrossFrameImpl._createSafe(_open3(url, name, options)); |
| 23 } | 18 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 128 |
| 134 String createObjectUrl(object) native ''' | 129 String createObjectUrl(object) native ''' |
| 135 return (window.URL || window.webkitURL).createObjectURL(object) | 130 return (window.URL || window.webkitURL).createObjectURL(object) |
| 136 '''; | 131 '''; |
| 137 | 132 |
| 138 void revokeObjectUrl(String objectUrl) native ''' | 133 void revokeObjectUrl(String objectUrl) native ''' |
| 139 (window.URL || window.webkitURL).revokeObjectURL(objectUrl) | 134 (window.URL || window.webkitURL).revokeObjectURL(objectUrl) |
| 140 '''; | 135 '''; |
| 141 $!MEMBERS | 136 $!MEMBERS |
| 142 } | 137 } |
| OLD | NEW |