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

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

Issue 2807533003: [WIP2] off-main-thread loading
Patch Set: rebase Created 3 years, 7 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 39dedd72a6c594cf47d4bfc1f7607cefb57bfdbd..b651f4ea23e6e95ec1e3a909e5f13d8d11e95ed6 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -320,8 +320,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);
}
@@ -370,8 +371,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);
@@ -393,12 +394,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);
}
@@ -406,8 +408,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);
}
@@ -416,7 +419,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);
@@ -427,7 +431,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)
@@ -546,6 +550,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();
}
@@ -735,7 +745,7 @@ SecurityContext* FrameFetchContext::GetParentSecurityContext() 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;
}
@@ -744,8 +754,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