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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2109843003: Adds enableVirtualTime and setVirtualTimePolicy To Emulation domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove frame iteration Created 4 years, 5 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: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 3ed51134262fa46935f0d3d99db300acd26f7100..7672e99fef0350776a9a29091905cab548acfd74 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -73,6 +73,7 @@
#include "public/platform/WebDocumentSubresourceFilter.h"
#include "public/platform/WebFrameScheduler.h"
#include "public/platform/WebInsecureRequestPolicy.h"
+#include "public/platform/WebViewScheduler.h"
#include <algorithm>
#include <memory>
@@ -319,6 +320,8 @@ void FrameFetchContext::dispatchWillSendRequest(unsigned long identifier, Resour
prepareRequest(identifier, request, redirectResponse);
TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceSendRequest", TRACE_EVENT_SCOPE_THREAD, "data", InspectorSendRequestEvent::data(identifier, frame(), request));
InspectorInstrumentation::willSendRequest(frame(), identifier, masterDocumentLoader(), request, redirectResponse, initiatorInfo);
+ if (frame()->frameScheduler())
+ frame()->frameScheduler()->incrementPendingResourceLoadCount();
}
void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, const ResourceResponse& response, WebURLRequest::FrameType frameType, WebURLRequest::RequestContext requestContext, Resource* resource)
@@ -368,6 +371,8 @@ void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier, doubl
TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceFinish", TRACE_EVENT_SCOPE_THREAD, "data", InspectorResourceFinishEvent::data(identifier, finishTime, false));
InspectorInstrumentation::didFinishLoading(frame(), identifier, finishTime, encodedDataLength);
+ if (frame()->frameScheduler())
+ frame()->frameScheduler()->decrementPendingResourceLoadCount();
}
void FrameFetchContext::dispatchDidFail(unsigned long identifier, const ResourceError& error, bool isInternalRequest)
@@ -379,6 +384,8 @@ void FrameFetchContext::dispatchDidFail(unsigned long identifier, const Resource
// Notification to FrameConsole should come AFTER InspectorInstrumentation call, DevTools front-end relies on this.
if (!isInternalRequest)
frame()->console().didFailLoading(identifier, error);
+ if (frame()->frameScheduler())
+ frame()->frameScheduler()->decrementPendingResourceLoadCount();
}
void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(unsigned long identifier, Resource* resource, WebURLRequest::FrameType frameType, WebURLRequest::RequestContext requestContext)

Powered by Google App Engine
This is Rietveld 408576698