| 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/RemoteFrameClientImpl.h" |
| 7 | 7 |
| 8 #include "platform/exported/WrappedResourceRequest.h" |
| 8 #include "platform/weborigin/SecurityOrigin.h" | 9 #include "platform/weborigin/SecurityOrigin.h" |
| 10 #include "platform/weborigin/SecurityPolicy.h" |
| 9 #include "web/WebLocalFrameImpl.h" | 11 #include "web/WebLocalFrameImpl.h" |
| 10 #include "web/WebRemoteFrameImpl.h" | 12 #include "web/WebRemoteFrameImpl.h" |
| 11 | 13 |
| 12 namespace blink { | 14 namespace blink { |
| 13 | 15 |
| 14 RemoteFrameClient::RemoteFrameClient(WebRemoteFrameImpl* webFrame) | 16 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame) |
| 15 : m_webFrame(webFrame) | 17 : m_webFrame(webFrame) |
| 16 { | 18 { |
| 17 } | 19 } |
| 18 | 20 |
| 19 Frame* RemoteFrameClient::opener() const | 21 Frame* RemoteFrameClientImpl::opener() const |
| 20 { | 22 { |
| 21 return toCoreFrame(m_webFrame->opener()); | 23 return toCoreFrame(m_webFrame->opener()); |
| 22 } | 24 } |
| 23 | 25 |
| 24 void RemoteFrameClient::setOpener(Frame*) | 26 void RemoteFrameClientImpl::setOpener(Frame*) |
| 25 { | 27 { |
| 26 // FIXME: Implement. | 28 // FIXME: Implement. |
| 27 } | 29 } |
| 28 | 30 |
| 29 Frame* RemoteFrameClient::parent() const | 31 Frame* RemoteFrameClientImpl::parent() const |
| 30 { | 32 { |
| 31 return toCoreFrame(m_webFrame->parent()); | 33 return toCoreFrame(m_webFrame->parent()); |
| 32 } | 34 } |
| 33 | 35 |
| 34 Frame* RemoteFrameClient::top() const | 36 Frame* RemoteFrameClientImpl::top() const |
| 35 { | 37 { |
| 36 return toCoreFrame(m_webFrame->top()); | 38 return toCoreFrame(m_webFrame->top()); |
| 37 } | 39 } |
| 38 | 40 |
| 39 Frame* RemoteFrameClient::previousSibling() const | 41 Frame* RemoteFrameClientImpl::previousSibling() const |
| 40 { | 42 { |
| 41 return toCoreFrame(m_webFrame->previousSibling()); | 43 return toCoreFrame(m_webFrame->previousSibling()); |
| 42 } | 44 } |
| 43 | 45 |
| 44 Frame* RemoteFrameClient::nextSibling() const | 46 Frame* RemoteFrameClientImpl::nextSibling() const |
| 45 { | 47 { |
| 46 return toCoreFrame(m_webFrame->nextSibling()); | 48 return toCoreFrame(m_webFrame->nextSibling()); |
| 47 } | 49 } |
| 48 | 50 |
| 49 Frame* RemoteFrameClient::firstChild() const | 51 Frame* RemoteFrameClientImpl::firstChild() const |
| 50 { | 52 { |
| 51 return toCoreFrame(m_webFrame->firstChild()); | 53 return toCoreFrame(m_webFrame->firstChild()); |
| 52 } | 54 } |
| 53 | 55 |
| 54 Frame* RemoteFrameClient::lastChild() const | 56 Frame* RemoteFrameClientImpl::lastChild() const |
| 55 { | 57 { |
| 56 return toCoreFrame(m_webFrame->lastChild()); | 58 return toCoreFrame(m_webFrame->lastChild()); |
| 57 } | 59 } |
| 58 | 60 |
| 59 bool RemoteFrameClient::willCheckAndDispatchMessageEvent( | 61 bool RemoteFrameClientImpl::willCheckAndDispatchMessageEvent( |
| 60 SecurityOrigin* target, MessageEvent* event, LocalFrame* sourceFrame) const | 62 SecurityOrigin* target, MessageEvent* event, LocalFrame* sourceFrame) const |
| 61 { | 63 { |
| 62 if (m_webFrame->client()) | 64 if (m_webFrame->client()) |
| 63 m_webFrame->client()->postMessageEvent(WebLocalFrameImpl::fromFrame(sour
ceFrame), m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event)); | 65 m_webFrame->client()->postMessageEvent(WebLocalFrameImpl::fromFrame(sour
ceFrame), m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event)); |
| 64 return true; | 66 return true; |
| 65 } | 67 } |
| 66 | 68 |
| 69 void RemoteFrameClientImpl::navigate(const ResourceRequest& request, bool should
ReplaceCurrentEntry) |
| 70 { |
| 71 if (m_webFrame->client()) |
| 72 m_webFrame->client()->navigate(m_webFrame, WrappedResourceRequest(reques
t), shouldReplaceCurrentEntry); |
| 73 } |
| 74 |
| 67 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |