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

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

Issue 2762423003: Made Frame constructors (and subclasses) take Page& instead of Page* (Closed)
Patch Set: Rebase 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
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/FrameHost.h"
11 #include "core/frame/LocalFrame.h" 11 #include "core/frame/LocalFrame.h"
12 #include "core/frame/RemoteDOMWindow.h" 12 #include "core/frame/RemoteDOMWindow.h"
13 #include "core/frame/RemoteFrameClient.h" 13 #include "core/frame/RemoteFrameClient.h"
14 #include "core/frame/RemoteFrameView.h" 14 #include "core/frame/RemoteFrameView.h"
15 #include "core/html/HTMLFrameOwnerElement.h" 15 #include "core/html/HTMLFrameOwnerElement.h"
16 #include "core/layout/api/LayoutPartItem.h" 16 #include "core/layout/api/LayoutPartItem.h"
17 #include "core/loader/FrameLoadRequest.h" 17 #include "core/loader/FrameLoadRequest.h"
18 #include "core/loader/FrameLoader.h" 18 #include "core/loader/FrameLoader.h"
19 #include "core/paint/PaintLayer.h" 19 #include "core/paint/PaintLayer.h"
20 #include "platform/PluginScriptForbiddenScope.h" 20 #include "platform/PluginScriptForbiddenScope.h"
21 #include "platform/UserGestureIndicator.h" 21 #include "platform/UserGestureIndicator.h"
22 #include "platform/graphics/GraphicsLayer.h" 22 #include "platform/graphics/GraphicsLayer.h"
23 #include "platform/loader/fetch/ResourceRequest.h" 23 #include "platform/loader/fetch/ResourceRequest.h"
24 #include "platform/weborigin/SecurityPolicy.h" 24 #include "platform/weborigin/SecurityPolicy.h"
25 #include "public/platform/WebLayer.h" 25 #include "public/platform/WebLayer.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, 29 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client,
30 Page* page, 30 Page& page,
31 FrameOwner* owner) 31 FrameOwner* owner)
32 : Frame(client, page, owner, RemoteWindowProxyManager::create(*this)), 32 : Frame(client, page, owner, RemoteWindowProxyManager::create(*this)),
33 m_securityContext(RemoteSecurityContext::create()) { 33 m_securityContext(RemoteSecurityContext::create()) {
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 Page* page, 38 Page& page,
39 FrameOwner* owner) { 39 FrameOwner* owner) {
40 return new RemoteFrame(client, page, owner); 40 return new RemoteFrame(client, page, owner);
41 } 41 }
42 42
43 RemoteFrame::~RemoteFrame() { 43 RemoteFrame::~RemoteFrame() {
44 ASSERT(!m_view); 44 ASSERT(!m_view);
45 } 45 }
46 46
47 DEFINE_TRACE(RemoteFrame) { 47 DEFINE_TRACE(RemoteFrame) {
48 visitor->trace(m_view); 48 visitor->trace(m_view);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 FrameVector childrenToDetach; 169 FrameVector childrenToDetach;
170 childrenToDetach.reserveCapacity(tree().childCount()); 170 childrenToDetach.reserveCapacity(tree().childCount());
171 for (Frame* child = tree().firstChild(); child; 171 for (Frame* child = tree().firstChild(); child;
172 child = child->tree().nextSibling()) 172 child = child->tree().nextSibling())
173 childrenToDetach.push_back(child); 173 childrenToDetach.push_back(child);
174 for (const auto& child : childrenToDetach) 174 for (const auto& child : childrenToDetach)
175 child->detach(FrameDetachType::Remove); 175 child->detach(FrameDetachType::Remove);
176 } 176 }
177 177
178 } // namespace blink 178 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/RemoteFrame.h ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698