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

Unified Diff: third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp

Issue 2781723007: Plumb initiator out of Blink. (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp b/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp
index b9ec594177fd3ae694a591c694ee944c533ea989..d0ab01430d73d1ca46d932ca1a8b66139cf66376 100644
--- a/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp
+++ b/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp
@@ -101,11 +101,16 @@ void RemoteFrameClientImpl::frameFocused() const {
m_webFrame->client()->frameFocused();
}
-void RemoteFrameClientImpl::navigate(const ResourceRequest& request,
+void RemoteFrameClientImpl::navigate(Document* originDocument,
+ const ResourceRequest& request,
bool shouldReplaceCurrentEntry) {
- if (m_webFrame->client())
- m_webFrame->client()->navigate(WrappedResourceRequest(request),
- shouldReplaceCurrentEntry);
+ if (m_webFrame->client()) {
+ // Detached documents shouldn't be navigating.
+ DCHECK(!originDocument || originDocument->frame());
+ m_webFrame->client()->navigate(
+ WebLocalFrameImpl::fromFrame(originDocument->frame()),
+ WrappedResourceRequest(request), shouldReplaceCurrentEntry);
+ }
}
void RemoteFrameClientImpl::reload(FrameLoadType loadType,
« no previous file with comments | « third_party/WebKit/Source/web/RemoteFrameClientImpl.h ('k') | third_party/WebKit/Source/web/WebDataSourceImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698