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

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

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed Nate's comments Created 5 years, 6 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 "config.h" 5 #include "config.h"
6 #include "core/frame/RemoteFrame.h" 6 #include "core/frame/RemoteFrame.h"
7 7
8 #include "bindings/core/v8/WindowProxy.h" 8 #include "bindings/core/v8/WindowProxy.h"
9 #include "bindings/core/v8/WindowProxyManager.h" 9 #include "bindings/core/v8/WindowProxyManager.h"
10 #include "core/dom/RemoteSecurityContext.h" 10 #include "core/dom/RemoteSecurityContext.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB ackForwardList, UserGestureStatus userGestureStatus) 62 void RemoteFrame::navigate(Document& originDocument, const KURL& url, bool lockB ackForwardList, UserGestureStatus userGestureStatus)
63 { 63 {
64 // The process where this frame actually lives won't have sufficient informa tion to determine 64 // The process where this frame actually lives won't have sufficient informa tion to determine
65 // correct referrer, since it won't have access to the originDocument. Set i t now. 65 // correct referrer, since it won't have access to the originDocument. Set i t now.
66 ResourceRequest request(url); 66 ResourceRequest request(url);
67 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe rrerPolicy(), url, originDocument.outgoingReferrer())); 67 request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.refe rrerPolicy(), url, originDocument.outgoingReferrer()));
68 request.setHasUserGesture(userGestureStatus == UserGestureStatus::Active); 68 request.setHasUserGesture(userGestureStatus == UserGestureStatus::Active);
69 remoteFrameClient()->navigate(request, lockBackForwardList); 69 remoteFrameClient()->navigate(request, lockBackForwardList);
70 } 70 }
71 71
72 void RemoteFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientR edirectPolicy) 72 void RemoteFrame::reload(FrameLoadType frameLoadType, ClientRedirectPolicy clien tRedirectPolicy)
73 { 73 {
74 remoteFrameClient()->reload(reloadPolicy, clientRedirectPolicy); 74 remoteFrameClient()->reload(frameLoadType, clientRedirectPolicy);
75 } 75 }
76 76
77 void RemoteFrame::detach() 77 void RemoteFrame::detach()
78 { 78 {
79 // Frame::detach() requires the caller to keep a reference to this, since 79 // Frame::detach() requires the caller to keep a reference to this, since
80 // otherwise it may clear the last reference to this, causing it to be 80 // otherwise it may clear the last reference to this, causing it to be
81 // deleted, which can cause a use-after-free. 81 // deleted, which can cause a use-after-free.
82 RefPtrWillBeRawPtr<RemoteFrame> protect(this); 82 RefPtrWillBeRawPtr<RemoteFrame> protect(this);
83 detachChildren(); 83 detachChildren();
84 if (!client()) 84 if (!client())
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (m_remotePlatformLayer) 155 if (m_remotePlatformLayer)
156 GraphicsLayer::registerContentsLayer(layer); 156 GraphicsLayer::registerContentsLayer(layer);
157 157
158 ASSERT(owner()); 158 ASSERT(owner());
159 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); 159 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate();
160 if (LayoutPart* layoutObject = ownerLayoutObject()) 160 if (LayoutPart* layoutObject = ownerLayoutObject())
161 layoutObject->layer()->updateSelfPaintingLayer(); 161 layoutObject->layer()->updateSelfPaintingLayer();
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698