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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.h

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: PlzNavigate: preserve SourceLocation when navigating 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 12 matching lines...) Expand all
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef DocumentLoader_h 30 #ifndef DocumentLoader_h
31 #define DocumentLoader_h 31 #define DocumentLoader_h
32 32
33 #include <memory>
34 #include "bindings/core/v8/SourceLocation.h"
33 #include "core/CoreExport.h" 35 #include "core/CoreExport.h"
34 #include "core/dom/ViewportDescription.h" 36 #include "core/dom/ViewportDescription.h"
35 #include "core/dom/WeakIdentifierMap.h" 37 #include "core/dom/WeakIdentifierMap.h"
36 #include "core/frame/FrameTypes.h" 38 #include "core/frame/FrameTypes.h"
37 #include "core/frame/csp/ContentSecurityPolicy.h" 39 #include "core/frame/csp/ContentSecurityPolicy.h"
38 #include "core/loader/DocumentLoadTiming.h" 40 #include "core/loader/DocumentLoadTiming.h"
39 #include "core/loader/DocumentWriter.h" 41 #include "core/loader/DocumentWriter.h"
40 #include "core/loader/FrameLoaderTypes.h" 42 #include "core/loader/FrameLoaderTypes.h"
41 #include "core/loader/LinkLoader.h" 43 #include "core/loader/LinkLoader.h"
42 #include "core/loader/NavigationPolicy.h" 44 #include "core/loader/NavigationPolicy.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 InitialScrollState& initialScrollState() { return m_initialScrollState; } 178 InitialScrollState& initialScrollState() { return m_initialScrollState; }
177 179
178 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } 180 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; }
179 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } 181 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; }
180 182
181 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, 183 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*,
182 LinkLoader::MediaPreloadPolicy); 184 LinkLoader::MediaPreloadPolicy);
183 185
184 Resource* startPreload(Resource::Type, FetchRequest&); 186 Resource* startPreload(Resource::Type, FetchRequest&);
185 187
188 std::unique_ptr<SourceLocation> copySourceLocation() const;
189 void setSourceLocation(std::unique_ptr<SourceLocation>);
190
186 DECLARE_VIRTUAL_TRACE(); 191 DECLARE_VIRTUAL_TRACE();
187 192
188 protected: 193 protected:
189 DocumentLoader(LocalFrame*, 194 DocumentLoader(LocalFrame*,
190 const ResourceRequest&, 195 const ResourceRequest&,
191 const SubstituteData&, 196 const SubstituteData&,
192 ClientRedirectPolicy); 197 ClientRedirectPolicy);
193 198
194 Vector<KURL> m_redirectChain; 199 Vector<KURL> m_redirectChain;
195 200
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 double m_timeOfLastDataReceived; 280 double m_timeOfLastDataReceived;
276 281
277 Member<ApplicationCacheHost> m_applicationCacheHost; 282 Member<ApplicationCacheHost> m_applicationCacheHost;
278 283
279 Member<ContentSecurityPolicy> m_contentSecurityPolicy; 284 Member<ContentSecurityPolicy> m_contentSecurityPolicy;
280 ClientHintsPreferences m_clientHintsPreferences; 285 ClientHintsPreferences m_clientHintsPreferences;
281 InitialScrollState m_initialScrollState; 286 InitialScrollState m_initialScrollState;
282 287
283 bool m_wasBlockedAfterCSP; 288 bool m_wasBlockedAfterCSP;
284 289
290 // PlzNavigate: set when committing a navigation. The data has originally been
291 // captured when the navigation was sent to the browser process, and it is
292 // sent back at commit time.
293 std::unique_ptr<SourceLocation> m_sourceLocation;
294
285 enum State { 295 enum State {
286 NotStarted, 296 NotStarted,
287 Provisional, 297 Provisional,
288 Committed, 298 Committed,
289 SentDidFinishLoad 299 SentDidFinishLoad
290 }; 300 };
291 State m_state; 301 State m_state;
292 302
293 // Used to protect against reentrancy into dataReceived(). 303 // Used to protect against reentrancy into dataReceived().
294 bool m_inDataReceived; 304 bool m_inDataReceived;
295 RefPtr<SharedBuffer> m_dataBuffer; 305 RefPtr<SharedBuffer> m_dataBuffer;
296 }; 306 };
297 307
298 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); 308 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);
299 309
300 } // namespace blink 310 } // namespace blink
301 311
302 #endif // DocumentLoader_h 312 #endif // DocumentLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698