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

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

Issue 10356092: Revert "Minimal fix to get cross frame tests working." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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/frog/html_frog.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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // TODO(vsm): Unify with Dartium version.
6 class _DOMWindowCrossFrameImpl implements Window {
7 // Private window.
8 _WindowImpl _window;
9
10 // Fields.
11 // TODO(vsm): Implement history and location getters.
12
13 bool get closed() => _window.closed;
14 int get length() => _window.length;
15 Window get opener() => _createSafe(_window.opener);
16 Window get parent() => _createSafe(_window.parent);
17 Window get top() => _createSafe(_window.top);
18
19 // Methods.
20 void focus() => _window.focus();
21
22 void blur() => _window.blur();
23
24 void close() => _window.close();
25
26 void postMessage(Dynamic message,
27 String targetOrigin,
28 [List messagePorts = null]) {
29 if (messagePorts == null) {
30 _window.postMessage(message, targetOrigin);
31 } else {
32 _window.postMessage(message, targetOrigin, messagePorts);
33 }
34 }
35
36 // Implementation support.
37 _DOMWindowCrossFrameImpl(this._window);
38
39 static Window _createSafe(w) {
40 if (w === window) {
41 return w;
42 } else {
43 // TODO(vsm): Cache or implement equality.
44 return new _DOMWindowCrossFrameImpl(w);
45 }
46 }
47 }
OLDNEW
« no previous file with comments | « lib/html/frog/html_frog.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698