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

Side by Side Diff: third_party/WebKit/Source/web/WebDataSourceImpl.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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 28 matching lines...) Expand all
39 #include "public/platform/WebVector.h" 39 #include "public/platform/WebVector.h"
40 #include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider. h" 40 #include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider. h"
41 #include "wtf/PtrUtil.h" 41 #include "wtf/PtrUtil.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 WebDataSourceImpl* WebDataSourceImpl::create( 45 WebDataSourceImpl* WebDataSourceImpl::create(
46 LocalFrame* frame, 46 LocalFrame* frame,
47 const ResourceRequest& request, 47 const ResourceRequest& request,
48 const SubstituteData& data, 48 const SubstituteData& data,
49 ClientRedirectPolicy clientRedirectPolicy) { 49 ClientRedirectPolicy clientRedirectPolicy,
50 Document* originDocument) {
50 DCHECK(frame); 51 DCHECK(frame);
51 52
52 return new WebDataSourceImpl(frame, request, data, clientRedirectPolicy); 53 return new WebDataSourceImpl(frame, request, data, clientRedirectPolicy,
54 originDocument);
53 } 55 }
54 56
55 const WebURLRequest& WebDataSourceImpl::originalRequest() const { 57 const WebURLRequest& WebDataSourceImpl::originalRequest() const {
56 return m_originalRequestWrapper; 58 return m_originalRequestWrapper;
57 } 59 }
58 60
59 const WebURLRequest& WebDataSourceImpl::getRequest() const { 61 const WebURLRequest& WebDataSourceImpl::getRequest() const {
60 return m_requestWrapper; 62 return m_requestWrapper;
61 } 63 }
62 64
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return WebNavigationTypeFormResubmitted; 135 return WebNavigationTypeFormResubmitted;
134 case NavigationTypeOther: 136 case NavigationTypeOther:
135 default: 137 default:
136 return WebNavigationTypeOther; 138 return WebNavigationTypeOther;
137 } 139 }
138 } 140 }
139 141
140 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, 142 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame,
141 const ResourceRequest& request, 143 const ResourceRequest& request,
142 const SubstituteData& data, 144 const SubstituteData& data,
143 ClientRedirectPolicy clientRedirectPolicy) 145 ClientRedirectPolicy clientRedirectPolicy,
144 : DocumentLoader(frame, request, data, clientRedirectPolicy), 146 Document* originDocument)
147 : DocumentLoader(frame,
148 request,
149 data,
150 clientRedirectPolicy,
151 originDocument),
145 m_originalRequestWrapper(DocumentLoader::originalRequest()), 152 m_originalRequestWrapper(DocumentLoader::originalRequest()),
146 m_requestWrapper(DocumentLoader::getRequest()), 153 m_requestWrapper(DocumentLoader::getRequest()),
147 m_responseWrapper(DocumentLoader::response()) {} 154 m_responseWrapper(DocumentLoader::response()) {}
148 155
149 WebDataSourceImpl::~WebDataSourceImpl() { 156 WebDataSourceImpl::~WebDataSourceImpl() {
150 // Verify that detachFromFrame() has been called. 157 // Verify that detachFromFrame() has been called.
151 DCHECK(!m_extraData); 158 DCHECK(!m_extraData);
152 } 159 }
153 160
154 void WebDataSourceImpl::detachFromFrame() { 161 void WebDataSourceImpl::detachFromFrame() {
(...skipping 27 matching lines...) Expand all
182 189
183 void WebDataSourceImpl::resetSourceLocation() { 190 void WebDataSourceImpl::resetSourceLocation() {
184 DocumentLoader::setSourceLocation(nullptr); 191 DocumentLoader::setSourceLocation(nullptr);
185 } 192 }
186 193
187 DEFINE_TRACE(WebDataSourceImpl) { 194 DEFINE_TRACE(WebDataSourceImpl) {
188 DocumentLoader::trace(visitor); 195 DocumentLoader::trace(visitor);
189 } 196 }
190 197
191 } // namespace blink 198 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698