Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / RemoteFrameClient.cpp
index 9632554..ff9d6a1 100644 (file)
@@ -5,6 +5,8 @@
 #include "config.h"
 #include "web/RemoteFrameClient.h"
 
+#include "platform/weborigin/SecurityOrigin.h"
+#include "web/WebLocalFrameImpl.h"
 #include "web/WebRemoteFrameImpl.h"
 
 namespace blink {
@@ -54,4 +56,12 @@ Frame* RemoteFrameClient::lastChild() const
     return toCoreFrame(m_webFrame->lastChild());
 }
 
+bool RemoteFrameClient::willCheckAndDispatchMessageEvent(
+    SecurityOrigin* target, MessageEvent* event, LocalFrame* sourceFrame) const
+{
+    if (m_webFrame->client())
+        m_webFrame->client()->postMessageEvent(WebLocalFrameImpl::fromFrame(sourceFrame), m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event));
+    return true;
+}
+
 } // namespace blink