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 "core/frame/RemoteFrame.h" | 5 #include "core/frame/RemoteFrame.h" |
6 | 6 |
7 #include "bindings/core/v8/WindowProxy.h" | 7 #include "bindings/core/v8/WindowProxy.h" |
8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
9 #include "core/dom/RemoteSecurityContext.h" | 9 #include "core/dom/RemoteSecurityContext.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "platform/weborigin/SecurityPolicy.h" | 23 #include "platform/weborigin/SecurityPolicy.h" |
24 #include "public/platform/WebLayer.h" | 24 #include "public/platform/WebLayer.h" |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
27 | 27 |
28 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, | 28 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, |
29 FrameHost* host, | 29 FrameHost* host, |
30 FrameOwner* owner) | 30 FrameOwner* owner) |
31 : Frame(client, host, owner), | 31 : Frame(client, host, owner), |
32 m_securityContext(RemoteSecurityContext::create()), | 32 m_securityContext(RemoteSecurityContext::create()), |
33 m_windowProxyManager(WindowProxyManager::create(*this)) { | 33 m_windowProxyManager(RemoteWindowProxyManager::create(*this)) { |
34 m_domWindow = RemoteDOMWindow::create(*this); | 34 m_domWindow = RemoteDOMWindow::create(*this); |
35 } | 35 } |
36 | 36 |
37 RemoteFrame* RemoteFrame::create(RemoteFrameClient* client, | 37 RemoteFrame* RemoteFrame::create(RemoteFrameClient* client, |
38 FrameHost* host, | 38 FrameHost* host, |
39 FrameOwner* owner) { | 39 FrameOwner* owner) { |
40 return new RemoteFrame(client, host, owner); | 40 return new RemoteFrame(client, host, owner); |
41 } | 41 } |
42 | 42 |
43 RemoteFrame::~RemoteFrame() { | 43 RemoteFrame::~RemoteFrame() { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 GraphicsLayer::registerContentsLayer(m_webLayer); | 180 GraphicsLayer::registerContentsLayer(m_webLayer); |
181 | 181 |
182 ASSERT(owner()); | 182 ASSERT(owner()); |
183 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); | 183 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); |
184 } | 184 } |
185 | 185 |
186 void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source) { | 186 void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source) { |
187 client()->advanceFocus(type, source); | 187 client()->advanceFocus(type, source); |
188 } | 188 } |
189 | 189 |
| 190 WindowProxyManagerBase* RemoteFrame::getWindowProxyManager() const { |
| 191 return m_windowProxyManager.get(); |
| 192 } |
| 193 |
190 void RemoteFrame::detachChildren() { | 194 void RemoteFrame::detachChildren() { |
191 using FrameVector = HeapVector<Member<Frame>>; | 195 using FrameVector = HeapVector<Member<Frame>>; |
192 FrameVector childrenToDetach; | 196 FrameVector childrenToDetach; |
193 childrenToDetach.reserveCapacity(tree().childCount()); | 197 childrenToDetach.reserveCapacity(tree().childCount()); |
194 for (Frame* child = tree().firstChild(); child; | 198 for (Frame* child = tree().firstChild(); child; |
195 child = child->tree().nextSibling()) | 199 child = child->tree().nextSibling()) |
196 childrenToDetach.push_back(child); | 200 childrenToDetach.push_back(child); |
197 for (const auto& child : childrenToDetach) | 201 for (const auto& child : childrenToDetach) |
198 child->detach(FrameDetachType::Remove); | 202 child->detach(FrameDetachType::Remove); |
199 } | 203 } |
200 | 204 |
201 } // namespace blink | 205 } // namespace blink |
OLD | NEW |