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

Side by Side Diff: lib/html/src/dart2js_DOMImplementation.dart

Issue 10985089: Fix the type on a wrapped window (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regen dart:html Created 8 years, 2 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 | « lib/html/dartium/html_dartium.dart ('k') | tests/html/html.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // TODO(vsm): Unify with Dartium version. 5 // TODO(vsm): Unify with Dartium version.
6 class _DOMWindowCrossFrameImpl implements Window { 6 class _DOMWindowCrossFrameImpl implements Window {
7 // Private window. 7 // Private window. Note, this is a window in another frame, so it
8 _WindowImpl _window; 8 // cannot be typed as "Window" as its prototype is not patched
9 // properly. Its fields and methods can only be accessed via JavaScript.
10 var _window;
9 11
10 // Fields. 12 // Fields.
11 // TODO(vsm): Implement history and location getters. 13 // TODO(vsm): Implement history and location getters.
12 14
13 // TODO(vsm): Add frames to navigate subframes. See 2312. 15 // TODO(vsm): Add frames to navigate subframes. See 2312.
14 16
15 bool get closed => _closed(_window); 17 bool get closed => _closed(_window);
16 static bool _closed(win) native "return win.closed;"; 18 static bool _closed(win) native "return win.closed;";
17 19
18 Window get opener => _createSafe(_opener(_window)); 20 Window get opener => _createSafe(_opener(_window));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 62
61 static Window _createSafe(w) { 63 static Window _createSafe(w) {
62 if (w === window) { 64 if (w === window) {
63 return w; 65 return w;
64 } else { 66 } else {
65 // TODO(vsm): Cache or implement equality. 67 // TODO(vsm): Cache or implement equality.
66 return new _DOMWindowCrossFrameImpl(w); 68 return new _DOMWindowCrossFrameImpl(w);
67 } 69 }
68 } 70 }
69 } 71 }
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698