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

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

Issue 1426923007: Remove PluginLoadObserver and related logic, it was only used for NPAPI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 void DocumentLoader::mainReceivedError(const ResourceError& error) 212 void DocumentLoader::mainReceivedError(const ResourceError& error)
213 { 213 {
214 ASSERT(!error.isNull()); 214 ASSERT(!error.isNull());
215 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In spectorInstrumentation::isDebuggerPaused(m_frame)); 215 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In spectorInstrumentation::isDebuggerPaused(m_frame));
216 if (m_applicationCacheHost) 216 if (m_applicationCacheHost)
217 m_applicationCacheHost->failedLoadingMainResource(); 217 m_applicationCacheHost->failedLoadingMainResource();
218 if (!frameLoader()) 218 if (!frameLoader())
219 return; 219 return;
220 m_mainDocumentError = error;
221 if (m_state < MainResourceDone) 220 if (m_state < MainResourceDone)
222 m_state = MainResourceDone; 221 m_state = MainResourceDone;
223 frameLoader()->receivedMainResourceError(this, error); 222 frameLoader()->receivedMainResourceError(this, error);
224 clearMainResourceHandle(); 223 clearMainResourceHandle();
225 } 224 }
226 225
227 // Cancels the data source's pending loads. Conceptually, a data source only lo ads 226 // Cancels the data source's pending loads. Conceptually, a data source only lo ads
228 // one document at a time, but one document may have many related resources. 227 // one document at a time, but one document may have many related resources.
229 // stopLoading will stop all loads initiated by the data source, 228 // stopLoading will stop all loads initiated by the data source,
230 // but not loads initiated by child frames' data sources -- that's the WebFrame' s job. 229 // but not loads initiated by child frames' data sources -- that's the WebFrame' s job.
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni tialEmptyDocument()) 715 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni tialEmptyDocument())
717 m_request.setURL(blankURL()); 716 m_request.setURL(blankURL());
718 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str ing()); 717 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str ing());
719 finishedLoading(monotonicallyIncreasingTime()); 718 finishedLoading(monotonicallyIncreasingTime());
720 return true; 719 return true;
721 } 720 }
722 721
723 void DocumentLoader::startLoadingMainResource() 722 void DocumentLoader::startLoadingMainResource()
724 { 723 {
725 RefPtrWillBeRawPtr<DocumentLoader> protect(this); 724 RefPtrWillBeRawPtr<DocumentLoader> protect(this);
726 m_mainDocumentError = ResourceError();
727 timing().markNavigationStart(); 725 timing().markNavigationStart();
728 ASSERT(!m_mainResource); 726 ASSERT(!m_mainResource);
729 ASSERT(m_state == NotStarted); 727 ASSERT(m_state == NotStarted);
730 m_state = Provisional; 728 m_state = Provisional;
731 729
732 if (maybeLoadEmpty()) 730 if (maybeLoadEmpty())
733 return; 731 return;
734 732
735 ASSERT(timing().navigationStart()); 733 ASSERT(timing().navigationStart());
736 ASSERT(!timing().fetchStart()); 734 ASSERT(!timing().fetchStart());
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 { 832 {
835 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 833 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
836 if (!source.isNull()) 834 if (!source.isNull())
837 m_writer->appendReplacingData(source); 835 m_writer->appendReplacingData(source);
838 endWriting(m_writer.get()); 836 endWriting(m_writer.get());
839 } 837 }
840 838
841 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 839 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
842 840
843 } // namespace blink 841 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698