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

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

Issue 1846143003: Propogate loading behavior data from Blink to content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: japhet@ review Created 4 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 return resource; 204 return resource;
205 } 205 }
206 206
207 void DocumentLoader::didChangePerformanceTiming() 207 void DocumentLoader::didChangePerformanceTiming()
208 { 208 {
209 if (frame() && frame()->isMainFrame() && m_state >= Committed) { 209 if (frame() && frame()->isMainFrame() && m_state >= Committed) {
210 frameLoader()->client()->didChangePerformanceTiming(); 210 frameLoader()->client()->didChangePerformanceTiming();
211 } 211 }
212 } 212 }
213 213
214 void DocumentLoader::didObserveLoadingBehavior(WebLoadingBehaviorFlag behavior)
215 {
216 if (frame() && frame()->isMainFrame()) {
217 ASSERT(m_state >= Committed);
218 frameLoader()->client()->didObserveLoadingBehavior(behavior);
219 }
220 }
221
214 void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDoc umentNavigationSource sameDocumentNavigationSource) 222 void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDoc umentNavigationSource sameDocumentNavigationSource)
215 { 223 {
216 KURL oldURL = m_request.url(); 224 KURL oldURL = m_request.url();
217 m_originalRequest.setURL(newURL); 225 m_originalRequest.setURL(newURL);
218 m_request.setURL(newURL); 226 m_request.setURL(newURL);
219 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { 227 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) {
220 m_request.setHTTPMethod(HTTPNames::GET); 228 m_request.setHTTPMethod(HTTPNames::GET);
221 m_request.setHTTPBody(nullptr); 229 m_request.setHTTPBody(nullptr);
222 } 230 }
223 clearRedirectChain(); 231 clearRedirectChain();
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 { 692 {
685 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 693 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
686 if (!source.isNull()) 694 if (!source.isNull())
687 m_writer->appendReplacingData(source); 695 m_writer->appendReplacingData(source);
688 endWriting(m_writer.get()); 696 endWriting(m_writer.get());
689 } 697 }
690 698
691 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 699 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
692 700
693 } // namespace blink 701 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698