Give embedders a chance to handle postMessage calls
https://bugs.webkit.org/show_bug.cgi?id=73883
Source/WebCore:
To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept
postMessage calls to proxy windows. Originally we were just going to add a native event
listener on the Chromium side, but that required more changes to WebKit and was a bit of
a hack. See bug 73359 for a discuss about moving to this approach.
Patch by Karl Koscher <supersat@chromium.org> on 2012-01-03
Reviewed by Adam Barth.
Test: platform/chromium/fast/events/intercept-postmessage.html
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the
embedder to intercept postMessage calls
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessageTimerFired): add a call to
FrameLoaderClient::willCheckAndDispatchPostMessage
Source/WebKit/chromium:
Patch by Karl Koscher <supersat@chromium.org> on 2012-01-03
Reviewed by Adam Barth.
* public/WebFrameClient.h:
(WebKit::WebFrameClient::willCheckAndDispatchMessageEvent):
interface to give the embedder a chance to handle this postMessage call
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::willCheckAndDispatchMessageEvent): Call
willCheckAndDispatchMessageEvent on WebFrameClient
* src/FrameLoaderClientImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104005
268f45cc-cd09-0410-ab3c-
d52691b4dbfc