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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 1288973002: Observing DocumentTiming and sending data to RenderFrameImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Document logic moved to DocumentTiming Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index ff8973abc5c3e7e491144a5ba6d2021dd3837123..e5f9bacb3f95a8edc00bde9d2691df8c1ebda6f0 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -91,6 +91,10 @@ DocumentLoader::DocumentLoader(LocalFrame* frame, const ResourceRequest& req, co
, m_isClientRedirect(false)
, m_replacesCurrentHistoryItem(false)
, m_navigationType(NavigationTypeOther)
+#if !ENABLE(OILPAN)
+ , m_weakFactory(this)
+#endif
+ , m_documentLoadTiming(this->weakReference())
dcheng 2015/08/18 17:24:47 Ditto.
, m_timeOfLastDataReceived(0.0)
, m_applicationCacheHost(ApplicationCacheHost::create(this))
, m_state(NotStarted)
@@ -179,6 +183,12 @@ void DocumentLoader::startPreload(Resource::Type type, FetchRequest& request)
fetcher()->preloadStarted(resource.get());
}
+void DocumentLoader::didChangePerformanceTiming()
+{
+ if (frameLoader())
+ frameLoader()->client()->didChangePerformanceTiming();
+}
+
void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocumentNavigationSource sameDocumentNavigationSource)
{
KURL oldURL = m_request.url();
@@ -432,6 +442,15 @@ bool DocumentLoader::shouldContinueForResponse() const
return true;
}
+WeakPtrWillBeRawPtr<DocumentLoader> DocumentLoader::weakReference()
+{
+#if ENABLE(OILPAN)
+ return this;
+#else
+ return m_weakFactory.createWeakPtr();
+#endif
+}
+
void DocumentLoader::cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse& response)
{
InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, mainResourceIdentifier(), response);

Powered by Google App Engine
This is Rietveld 408576698