Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/WebKit/Source/core/frame/RemoteFrame.cpp

Issue 2756383002: Change Frame to store a Page instead of a FrameHost. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/FrameHost.h"
10 #include "core/frame/LocalFrame.h" 11 #include "core/frame/LocalFrame.h"
11 #include "core/frame/RemoteDOMWindow.h" 12 #include "core/frame/RemoteDOMWindow.h"
12 #include "core/frame/RemoteFrameClient.h" 13 #include "core/frame/RemoteFrameClient.h"
13 #include "core/frame/RemoteFrameView.h" 14 #include "core/frame/RemoteFrameView.h"
14 #include "core/html/HTMLFrameOwnerElement.h" 15 #include "core/html/HTMLFrameOwnerElement.h"
15 #include "core/layout/api/LayoutPartItem.h" 16 #include "core/layout/api/LayoutPartItem.h"
16 #include "core/loader/FrameLoadRequest.h" 17 #include "core/loader/FrameLoadRequest.h"
17 #include "core/loader/FrameLoader.h" 18 #include "core/loader/FrameLoader.h"
18 #include "core/paint/PaintLayer.h" 19 #include "core/paint/PaintLayer.h"
19 #include "platform/PluginScriptForbiddenScope.h" 20 #include "platform/PluginScriptForbiddenScope.h"
20 #include "platform/UserGestureIndicator.h" 21 #include "platform/UserGestureIndicator.h"
21 #include "platform/graphics/GraphicsLayer.h" 22 #include "platform/graphics/GraphicsLayer.h"
22 #include "platform/loader/fetch/ResourceRequest.h" 23 #include "platform/loader/fetch/ResourceRequest.h"
23 #include "platform/weborigin/SecurityPolicy.h" 24 #include "platform/weborigin/SecurityPolicy.h"
24 #include "public/platform/WebLayer.h" 25 #include "public/platform/WebLayer.h"
25 26
26 namespace blink { 27 namespace blink {
27 28
28 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, 29 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client,
29 FrameHost* host, 30 FrameHost* host,
30 FrameOwner* owner) 31 FrameOwner* owner)
31 : Frame(client, host, owner, RemoteWindowProxyManager::create(*this)), 32 : Frame(client,
33 host ? &host->page() : nullptr,
34 owner,
35 RemoteWindowProxyManager::create(*this)),
32 m_securityContext(RemoteSecurityContext::create()) { 36 m_securityContext(RemoteSecurityContext::create()) {
33 m_domWindow = RemoteDOMWindow::create(*this); 37 m_domWindow = RemoteDOMWindow::create(*this);
34 } 38 }
35 39
36 RemoteFrame* RemoteFrame::create(RemoteFrameClient* client, 40 RemoteFrame* RemoteFrame::create(RemoteFrameClient* client,
37 FrameHost* host, 41 FrameHost* host,
38 FrameOwner* owner) { 42 FrameOwner* owner) {
39 return new RemoteFrame(client, host, owner); 43 return new RemoteFrame(client, host, owner);
40 } 44 }
41 45
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 FrameVector childrenToDetach; 172 FrameVector childrenToDetach;
169 childrenToDetach.reserveCapacity(tree().childCount()); 173 childrenToDetach.reserveCapacity(tree().childCount());
170 for (Frame* child = tree().firstChild(); child; 174 for (Frame* child = tree().firstChild(); child;
171 child = child->tree().nextSibling()) 175 child = child->tree().nextSibling())
172 childrenToDetach.push_back(child); 176 childrenToDetach.push_back(child);
173 for (const auto& child : childrenToDetach) 177 for (const auto& child : childrenToDetach)
174 child->detach(FrameDetachType::Remove); 178 child->detach(FrameDetachType::Remove);
175 } 179 }
176 180
177 } // namespace blink 181 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698