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

Unified Diff: Source/core/frame/RemoteFrame.cpp

Issue 1176843006: Move window.close implementation to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/RemoteFrame.h ('k') | Source/core/frame/RemoteFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/RemoteFrame.cpp
diff --git a/Source/core/frame/RemoteFrame.cpp b/Source/core/frame/RemoteFrame.cpp
index e2991b4b1bc4da0c691b993412b700e0d71e1361..f6256f4c3dd21d5ec92c9b6d794283d834073757 100644
--- a/Source/core/frame/RemoteFrame.cpp
+++ b/Source/core/frame/RemoteFrame.cpp
@@ -150,6 +150,13 @@ void RemoteFrame::createView()
}
}
+void RemoteFrame::close()
+{
+ // window.close only makes sense on a top-level frame.
+ if (!tree().parent())
+ remoteFrameClient()->close();
dcheng 2015/06/10 20:10:41 LocalDOMWindow::close() has a bunch of other stuff
nasko 2015/06/11 00:04:39 I've added those to RemoteDOMWindow.
dcheng 2015/06/11 02:00:06 Well... but we can change that to do what we need.
+}
+
RemoteFrameClient* RemoteFrame::remoteFrameClient() const
{
return static_cast<RemoteFrameClient*>(client());
« no previous file with comments | « Source/core/frame/RemoteFrame.h ('k') | Source/core/frame/RemoteFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698