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

Side by Side Diff: third_party/WebKit/Source/web/RemoteFrameClientImpl.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 "web/RemoteFrameClientImpl.h" 5 #include "web/RemoteFrameClientImpl.h"
6 6
7 #include "core/events/KeyboardEvent.h" 7 #include "core/events/KeyboardEvent.h"
8 #include "core/events/MouseEvent.h" 8 #include "core/events/MouseEvent.h"
9 #include "core/events/WheelEvent.h" 9 #include "core/events/WheelEvent.h"
10 #include "core/frame/RemoteFrame.h" 10 #include "core/frame/RemoteFrame.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 Frame* RemoteFrameClientImpl::firstChild() const { 95 Frame* RemoteFrameClientImpl::firstChild() const {
96 return toCoreFrame(m_webFrame->firstChild()); 96 return toCoreFrame(m_webFrame->firstChild());
97 } 97 }
98 98
99 void RemoteFrameClientImpl::frameFocused() const { 99 void RemoteFrameClientImpl::frameFocused() const {
100 if (m_webFrame->client()) 100 if (m_webFrame->client())
101 m_webFrame->client()->frameFocused(); 101 m_webFrame->client()->frameFocused();
102 } 102 }
103 103
104 void RemoteFrameClientImpl::navigate(const ResourceRequest& request, 104 void RemoteFrameClientImpl::navigate(Document* originDocument,
105 const ResourceRequest& request,
105 bool shouldReplaceCurrentEntry) { 106 bool shouldReplaceCurrentEntry) {
106 if (m_webFrame->client()) 107 if (m_webFrame->client()) {
107 m_webFrame->client()->navigate(WrappedResourceRequest(request), 108 // Detached documents shouldn't be navigating.
108 shouldReplaceCurrentEntry); 109 DCHECK(!originDocument || originDocument->frame());
110 m_webFrame->client()->navigate(
111 WebLocalFrameImpl::fromFrame(originDocument->frame()),
112 WrappedResourceRequest(request), shouldReplaceCurrentEntry);
113 }
109 } 114 }
110 115
111 void RemoteFrameClientImpl::reload(FrameLoadType loadType, 116 void RemoteFrameClientImpl::reload(FrameLoadType loadType,
112 ClientRedirectPolicy clientRedirectPolicy) { 117 ClientRedirectPolicy clientRedirectPolicy) {
113 DCHECK(isReloadLoadType(loadType)); 118 DCHECK(isReloadLoadType(loadType));
114 if (m_webFrame->client()) 119 if (m_webFrame->client())
115 m_webFrame->client()->reload( 120 m_webFrame->client()->reload(
116 static_cast<WebFrameLoadType>(loadType), 121 static_cast<WebFrameLoadType>(loadType),
117 static_cast<WebClientRedirectPolicy>(clientRedirectPolicy)); 122 static_cast<WebClientRedirectPolicy>(clientRedirectPolicy));
118 } 123 }
(...skipping 29 matching lines...) Expand all
148 LocalFrame* source) { 153 LocalFrame* source) {
149 m_webFrame->client()->advanceFocus(type, 154 m_webFrame->client()->advanceFocus(type,
150 WebLocalFrameImpl::fromFrame(source)); 155 WebLocalFrameImpl::fromFrame(source));
151 } 156 }
152 157
153 void RemoteFrameClientImpl::visibilityChanged(bool visible) { 158 void RemoteFrameClientImpl::visibilityChanged(bool visible) {
154 m_webFrame->client()->visibilityChanged(visible); 159 m_webFrame->client()->visibilityChanged(visible);
155 } 160 }
156 161
157 } // namespace blink 162 } // namespace blink
OLDNEW
« 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