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

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

Issue 543913002: Hook up postMessages to WebRemoteFrameClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix webkit_unit_tests compile Created 6 years, 3 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/FrameClient.h ('k') | Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 0dfa1b05271b5c9587a68c34c68a3249409bfed4..2306b50a2b41641866d6504f4cbaa27c5b49c1b7 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -140,6 +140,7 @@ public:
SecurityOrigin* targetOrigin() const { return m_targetOrigin.get(); }
ScriptCallStack* stackTrace() const { return m_stackTrace.get(); }
UserGestureToken* userGestureToken() const { return m_userGestureToken.get(); }
+ LocalDOMWindow* source() const { return m_source.get(); }
private:
virtual void fired() OVERRIDE
@@ -879,7 +880,8 @@ void LocalDOMWindow::postMessageTimerFired(PostMessageTimer* timer)
// Give the embedder a chance to intercept this postMessage because this
// LocalDOMWindow might be a proxy for another in browsers that support
// postMessage calls across WebKit instances.
- if (m_frame->loader().client()->willCheckAndDispatchMessageEvent(timer->targetOrigin(), event.get())) {
+ LocalFrame* source = timer->source()->document() ? timer->source()->document()->frame() : 0;
+ if (m_frame->client()->willCheckAndDispatchMessageEvent(timer->targetOrigin(), event.get(), source)) {
m_postMessageTimers.remove(timer);
return;
}
« no previous file with comments | « Source/core/frame/FrameClient.h ('k') | Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698