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

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

Issue 2781723007: Plumb initiator out of Blink. (Closed)
Patch Set: Created 3 years, 8 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/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void RemoteFrame::navigate(const FrameLoadRequest& passedRequest) { 63 void RemoteFrame::navigate(const FrameLoadRequest& passedRequest) {
64 FrameLoadRequest frameRequest(passedRequest); 64 FrameLoadRequest frameRequest(passedRequest);
65 65
66 // The process where this frame actually lives won't have sufficient 66 // The process where this frame actually lives won't have sufficient
67 // information to determine correct referrer, since it won't have access to 67 // information to determine correct referrer, since it won't have access to
68 // the originDocument. Set it now. 68 // the originDocument. Set it now.
69 FrameLoader::setReferrerForFrameRequest(frameRequest); 69 FrameLoader::setReferrerForFrameRequest(frameRequest);
70 70
71 frameRequest.resourceRequest().setHasUserGesture( 71 frameRequest.resourceRequest().setHasUserGesture(
72 UserGestureIndicator::processingUserGesture()); 72 UserGestureIndicator::processingUserGesture());
73 client()->navigate(frameRequest.resourceRequest(), 73 // TODO(dcheng): Should this DCHECK() that originDocument() is not null?
74 client()->navigate(frameRequest.originDocument(),
75 frameRequest.resourceRequest(),
74 frameRequest.replacesCurrentItem()); 76 frameRequest.replacesCurrentItem());
75 } 77 }
76 78
77 void RemoteFrame::reload(FrameLoadType frameLoadType, 79 void RemoteFrame::reload(FrameLoadType frameLoadType,
78 ClientRedirectPolicy clientRedirectPolicy) { 80 ClientRedirectPolicy clientRedirectPolicy) {
79 client()->reload(frameLoadType, clientRedirectPolicy); 81 client()->reload(frameLoadType, clientRedirectPolicy);
80 } 82 }
81 83
82 void RemoteFrame::detach(FrameDetachType type) { 84 void RemoteFrame::detach(FrameDetachType type) {
83 m_lifecycle.advanceTo(FrameLifecycle::Detaching); 85 m_lifecycle.advanceTo(FrameLifecycle::Detaching);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 FrameVector childrenToDetach; 167 FrameVector childrenToDetach;
166 childrenToDetach.reserveCapacity(tree().childCount()); 168 childrenToDetach.reserveCapacity(tree().childCount());
167 for (Frame* child = tree().firstChild(); child; 169 for (Frame* child = tree().firstChild(); child;
168 child = child->tree().nextSibling()) 170 child = child->tree().nextSibling())
169 childrenToDetach.push_back(child); 171 childrenToDetach.push_back(child);
170 for (const auto& child : childrenToDetach) 172 for (const auto& child : childrenToDetach)
171 child->detach(FrameDetachType::Remove); 173 child->detach(FrameDetachType::Remove);
172 } 174 }
173 175
174 } // namespace blink 176 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrameClient.h ('k') | third_party/WebKit/Source/core/frame/RemoteFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698