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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h

Issue 2899973003: [wip]devtools
Patch Set: cleanup 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/inspector/InspectorNetworkAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
index 33c7cff4bbfa62a3be7ae00d49379a25d3f34049..7c9e3847f09006ccc1bf1cbbf6142318bf1e8191 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
@@ -67,6 +67,10 @@ class CORE_EXPORT InspectorNetworkAgent final
static InspectorNetworkAgent* Create(InspectedFrames* inspected_frames) {
return new InspectorNetworkAgent(inspected_frames);
}
+ static InspectorNetworkAgent* CreateForWorker(
+ ExecutionContext* execution_context) {
+ return new InspectorNetworkAgent(execution_context);
+ }
void Restore() override;
@@ -74,34 +78,32 @@ class CORE_EXPORT InspectorNetworkAgent final
DECLARE_VIRTUAL_TRACE();
// Probes.
- void DidBlockRequest(LocalFrame*,
+ void DidBlockRequest(ExecutionContext*,
const ResourceRequest&,
DocumentLoader*,
const FetchInitiatorInfo&,
ResourceRequestBlockedReason);
void DidChangeResourcePriority(unsigned long identifier,
ResourceLoadPriority);
- void WillSendRequest(LocalFrame*,
+ void WillSendRequest(ExecutionContext*,
unsigned long identifier,
DocumentLoader*,
ResourceRequest&,
const ResourceResponse& redirect_response,
const FetchInitiatorInfo&);
void MarkResourceAsCached(unsigned long identifier);
- void DidReceiveResourceResponse(LocalFrame*,
- unsigned long identifier,
+ void DidReceiveResourceResponse(unsigned long identifier,
DocumentLoader*,
const ResourceResponse&,
Resource*);
- void DidReceiveData(LocalFrame*,
- unsigned long identifier,
+ void DidReceiveData(unsigned long identifier,
+ DocumentLoader*,
const char* data,
int data_length);
- void DidReceiveEncodedDataLength(LocalFrame*,
- unsigned long identifier,
+ void DidReceiveEncodedDataLength(unsigned long identifier,
int encoded_data_length);
- void DidFinishLoading(LocalFrame*,
- unsigned long identifier,
+ void DidFinishLoading(unsigned long identifier,
+ DocumentLoader*,
double monotonic_finish_time,
int64_t encoded_data_length,
int64_t decoded_body_length);
@@ -231,9 +233,10 @@ class CORE_EXPORT InspectorNetworkAgent final
private:
explicit InspectorNetworkAgent(InspectedFrames*);
+ explicit InspectorNetworkAgent(ExecutionContext*);
void Enable(int total_buffer_size, int resource_buffer_size);
- void WillSendRequestInternal(LocalFrame*,
+ void WillSendRequestInternal(ExecutionContext*,
unsigned long identifier,
DocumentLoader*,
const ResourceRequest&,
@@ -253,7 +256,10 @@ class CORE_EXPORT InspectorNetworkAgent final
std::unique_ptr<GetResponseBodyCallback>);
void ClearPendingRequestData();
+ // This is null while inspecting workers.
Member<InspectedFrames> inspected_frames_;
+ // This is null while inspecting frames.
+ Member<ExecutionContext> execution_context_;
String host_id_;
Member<NetworkResourcesData> resources_data_;

Powered by Google App Engine
This is Rietveld 408576698