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

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

Issue 2807533003: [WIP2] off-main-thread loading
Patch Set: call set_is_secure_context in EmbeddedSharedWorkerStub::CreateWorkerFetchContext() Created 3 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 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 2fb04743ce69654b9d7eb7c61ada4a633477fdfb..3179a3bdf8676776af0b5f974cf34cdbcde48018 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -315,8 +315,9 @@ void FrameFetchContext::DispatchWillSendRequest(
GetFrame()->Loader().Progress().WillStartLoading(identifier,
request.Priority());
}
- probe::willSendRequest(GetFrame(), identifier, MasterDocumentLoader(),
- request, redirect_response, initiator_info);
+ probe::willSendRequest(GetFrame()->GetDocument(), identifier,
+ MasterDocumentLoader(), request, redirect_response,
+ initiator_info);
if (GetFrame()->FrameScheduler())
GetFrame()->FrameScheduler()->DidStartLoading(identifier);
}
@@ -365,8 +366,8 @@ void FrameFetchContext::DispatchDidReceiveResponse(
GetFrame()->Loader().Progress().IncrementProgress(identifier, response);
GetLocalFrameClient()->DispatchDidReceiveResponse(response);
DocumentLoader* document_loader = MasterDocumentLoader();
- probe::didReceiveResourceResponse(GetFrame(), identifier, document_loader,
- response, resource);
+ probe::didReceiveResourceResponse(GetFrame()->GetDocument(), identifier,
+ document_loader, response, resource);
// It is essential that inspector gets resource response BEFORE console.
GetFrame()->Console().ReportResourceResponseReceived(document_loader,
identifier, response);
@@ -376,12 +377,13 @@ void FrameFetchContext::DispatchDidReceiveData(unsigned long identifier,
const char* data,
int data_length) {
GetFrame()->Loader().Progress().IncrementProgress(identifier, data_length);
- probe::didReceiveData(GetFrame(), identifier, data, data_length);
+ probe::didReceiveData(GetFrame()->GetDocument(), identifier,
+ MasterDocumentLoader(), data, data_length);
}
void FrameFetchContext::DispatchDidReceiveEncodedData(unsigned long identifier,
int encoded_data_length) {
- probe::didReceiveEncodedDataLength(GetFrame(), identifier,
+ probe::didReceiveEncodedDataLength(GetFrame()->GetDocument(), identifier,
encoded_data_length);
}
@@ -389,8 +391,9 @@ void FrameFetchContext::DispatchDidDownloadData(unsigned long identifier,
int data_length,
int encoded_data_length) {
GetFrame()->Loader().Progress().IncrementProgress(identifier, data_length);
- probe::didReceiveData(GetFrame(), identifier, 0, data_length);
- probe::didReceiveEncodedDataLength(GetFrame(), identifier,
+ probe::didReceiveData(GetFrame()->GetDocument(), identifier,
+ MasterDocumentLoader(), 0, data_length);
+ probe::didReceiveEncodedDataLength(GetFrame()->GetDocument(), identifier,
encoded_data_length);
}
@@ -399,7 +402,8 @@ void FrameFetchContext::DispatchDidFinishLoading(unsigned long identifier,
int64_t encoded_data_length,
int64_t decoded_body_length) {
GetFrame()->Loader().Progress().CompleteProgress(identifier);
- probe::didFinishLoading(GetFrame(), identifier, finish_time,
+ probe::didFinishLoading(GetFrame()->GetDocument(), identifier,
+ MasterDocumentLoader(), finish_time,
encoded_data_length, decoded_body_length);
if (GetFrame()->FrameScheduler())
GetFrame()->FrameScheduler()->DidStopLoading(identifier);
@@ -410,7 +414,7 @@ void FrameFetchContext::DispatchDidFail(unsigned long identifier,
int64_t encoded_data_length,
bool is_internal_request) {
GetFrame()->Loader().Progress().CompleteProgress(identifier);
- probe::didFailLoading(GetFrame(), identifier, error);
+ probe::didFailLoading(GetFrame()->GetDocument(), identifier, error);
// Notification to FrameConsole should come AFTER InspectorInstrumentation
// call, DevTools front-end relies on this.
if (!is_internal_request)
@@ -528,6 +532,12 @@ int64_t FrameFetchContext::ServiceWorkerID() const {
: -1;
}
+int FrameFetchContext::ApplicationCacheHostID() const {
+ if (!document_loader_)
+ return 0;
+ return document_loader_->GetApplicationCacheHost()->GetHostID();
+}
+
bool FrameFetchContext::IsMainFrame() const {
return GetFrame()->IsMainFrame();
}
@@ -699,6 +709,10 @@ ResourceLoadPriority FrameFetchContext::ModifyPriorityForExperiments(
return priority;
}
+RefPtr<WebTaskRunner> FrameFetchContext::TimerTaskRunner() const {
+ return GetFrame()->FrameScheduler()->TimerTaskRunner();
+}
+
RefPtr<WebTaskRunner> FrameFetchContext::LoadingTaskRunner() const {
return GetFrame()->FrameScheduler()->LoadingTaskRunner();
}
@@ -725,7 +739,7 @@ SecurityContext* FrameFetchContext::GetMainResourceSecurityContext() const {
bool FrameFetchContext::ShouldBlockRequestByInspector(
const ResourceRequest& resource_request) const {
bool should_block_request = false;
- probe::shouldBlockRequest(GetFrame(), resource_request,
+ probe::shouldBlockRequest(GetDocument(), resource_request,
&should_block_request);
return should_block_request;
}
@@ -734,8 +748,9 @@ void FrameFetchContext::DispatchDidBlockRequest(
const ResourceRequest& resource_request,
const FetchInitiatorInfo& fetch_initiator_info,
ResourceRequestBlockedReason blocked_reason) const {
- probe::didBlockRequest(GetFrame(), resource_request, MasterDocumentLoader(),
- fetch_initiator_info, blocked_reason);
+ probe::didBlockRequest(GetDocument(), resource_request,
+ MasterDocumentLoader(), fetch_initiator_info,
+ blocked_reason);
}
void FrameFetchContext::ReportLocalLoadFailed(const KURL& url) const {
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.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