| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "web/RemoteFrameClient.h" | 6 #include "web/RemoteFrameClient.h" |
| 7 | 7 |
| 8 #include "platform/weborigin/SecurityOrigin.h" |
| 9 #include "web/WebLocalFrameImpl.h" |
| 8 #include "web/WebRemoteFrameImpl.h" | 10 #include "web/WebRemoteFrameImpl.h" |
| 9 | 11 |
| 10 namespace blink { | 12 namespace blink { |
| 11 | 13 |
| 12 RemoteFrameClient::RemoteFrameClient(WebRemoteFrameImpl* webFrame) | 14 RemoteFrameClient::RemoteFrameClient(WebRemoteFrameImpl* webFrame) |
| 13 : m_webFrame(webFrame) | 15 : m_webFrame(webFrame) |
| 14 { | 16 { |
| 15 } | 17 } |
| 16 | 18 |
| 17 Frame* RemoteFrameClient::opener() const | 19 Frame* RemoteFrameClient::opener() const |
| (...skipping 29 matching lines...) Expand all Loading... |
| 47 Frame* RemoteFrameClient::firstChild() const | 49 Frame* RemoteFrameClient::firstChild() const |
| 48 { | 50 { |
| 49 return toCoreFrame(m_webFrame->firstChild()); | 51 return toCoreFrame(m_webFrame->firstChild()); |
| 50 } | 52 } |
| 51 | 53 |
| 52 Frame* RemoteFrameClient::lastChild() const | 54 Frame* RemoteFrameClient::lastChild() const |
| 53 { | 55 { |
| 54 return toCoreFrame(m_webFrame->lastChild()); | 56 return toCoreFrame(m_webFrame->lastChild()); |
| 55 } | 57 } |
| 56 | 58 |
| 59 bool RemoteFrameClient::willCheckAndDispatchMessageEvent( |
| 60 SecurityOrigin* target, MessageEvent* event, LocalFrame* sourceFrame) const |
| 61 { |
| 62 if (m_webFrame->client()) |
| 63 m_webFrame->client()->postMessageEvent(WebLocalFrameImpl::fromFrame(sour
ceFrame), m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event)); |
| 64 return true; |
| 65 } |
| 66 |
| 57 } // namespace blink | 67 } // namespace blink |
| OLD | NEW |