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..214ba503fa387f3598a9b93fdce006fdf1ae9ffe 100644 |
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h |
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h |
@@ -60,6 +60,7 @@ class XMLHttpRequest; |
class WebSocketHandshakeRequest; |
class WebSocketHandshakeResponse; |
+class WorkerGlobalScope; |
class CORE_EXPORT InspectorNetworkAgent final |
: public InspectorBaseAgent<protocol::Network::Metainfo> { |
@@ -67,6 +68,10 @@ class CORE_EXPORT InspectorNetworkAgent final |
static InspectorNetworkAgent* Create(InspectedFrames* inspected_frames) { |
return new InspectorNetworkAgent(inspected_frames); |
} |
+ static InspectorNetworkAgent* CreateForWorker( |
+ WorkerGlobalScope* worker_global_scope) { |
+ return new InspectorNetworkAgent(worker_global_scope); |
kinuko
2017/05/22 06:53:40
Does it make sense to make it take a generic Execu
horo
2017/05/22 07:32:17
Done.
|
+ } |
void Restore() override; |
@@ -74,34 +79,30 @@ class CORE_EXPORT InspectorNetworkAgent final |
DECLARE_VIRTUAL_TRACE(); |
// Probes. |
- void DidBlockRequest(LocalFrame*, |
- const ResourceRequest&, |
+ void DidBlockRequest(const ResourceRequest&, |
DocumentLoader*, |
const FetchInitiatorInfo&, |
ResourceRequestBlockedReason); |
void DidChangeResourcePriority(unsigned long identifier, |
ResourceLoadPriority); |
- void WillSendRequest(LocalFrame*, |
- unsigned long identifier, |
+ void WillSendRequest(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,10 +232,10 @@ class CORE_EXPORT InspectorNetworkAgent final |
private: |
explicit InspectorNetworkAgent(InspectedFrames*); |
+ explicit InspectorNetworkAgent(WorkerGlobalScope*); |
void Enable(int total_buffer_size, int resource_buffer_size); |
- void WillSendRequestInternal(LocalFrame*, |
- unsigned long identifier, |
+ void WillSendRequestInternal(unsigned long identifier, |
DocumentLoader*, |
const ResourceRequest&, |
const ResourceResponse& redirect_response, |
@@ -253,7 +254,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<WorkerGlobalScope> worker_global_scope_; |
String host_id_; |
Member<NetworkResourcesData> resources_data_; |