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

Unified Diff: client/dom/templates/dom/frog/impl_HTMLIFrameElement.darttemplate

Issue 9539003: Safely wrap window.top in frog dom. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and merge 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 side-by-side diff with in-line comments
Download patch
Index: client/dom/templates/dom/frog/impl_HTMLIFrameElement.darttemplate
diff --git a/client/dom/templates/dom/frog/impl_HTMLIFrameElement.darttemplate b/client/dom/templates/dom/frog/impl_HTMLIFrameElement.darttemplate
index 8cbdf855618aedea1b41e6d0b3165cba0c8b34f6..204154d30fae31d09d13016b5d7e8f8b819afee4 100644
--- a/client/dom/templates/dom/frog/impl_HTMLIFrameElement.darttemplate
+++ b/client/dom/templates/dom/frog/impl_HTMLIFrameElement.darttemplate
@@ -12,57 +12,3 @@ $!MEMBERS
return _DOMWindowCrossFrameImpl._createSafe(_contentWindow);
}
}
-
-// TODO(vsm): Unify with Dartium version.
-class _DOMWindowCrossFrameImpl implements DOMType, DOMWindow {
- // Private window.
- _DOMWindowJs _window;
-
- // DOMType
- var dartObjectLocalStorage;
- String get typeName() => "DOMWindow";
-
- // Fields.
- // TODO(vsm): Wrap these two.
- History get history() => _window.history;
- Location get location() => _window.location;
-
- bool get closed() => _window.closed;
- int get length() => _window.length;
- DOMWindow get opener() => _createDOMWindowCrossFrame(_window.opener);
- DOMWindow get parent() => _createDOMWindowCrossFrame(_window.parent);
- DOMWindow get top() => _createDOMWindowCrossFrame(_window.top);
-
- // Methods.
- void focus() {
- _window.focus();
- }
-
- void blur() {
- _window.blur();
- }
-
- void close() {
- _window.close();
- }
-
- void postMessage(Dynamic message,
- String targetOrigin,
- [List messagePorts = null]) {
- if (messagePorts == null) {
- _window.postMessage(message, targetOrigin);
- } else {
- _window.postMessage(message, targetOrigin, messagePorts);
- }
- }
-
- // Implementation support.
- _DOMWindowCrossFrameImpl(this._window);
-
- static DOMWindow _createSafe(w) {
- // TODO(vsm): Check if it's the top-level window. Return unwrapped.
-
- // TODO(vsm): Cache or implement equality.
- return new _DOMWindowCrossFrameImpl(w);
- }
-}
« no previous file with comments | « client/dom/templates/dom/frog/impl_DOMWindow.darttemplate ('k') | client/tests/client/dom/InnerFrameTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698