OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 static InspectorNetworkAgent* Create(InspectedFrames* inspected_frames) { | 67 static InspectorNetworkAgent* Create(InspectedFrames* inspected_frames) { |
68 return new InspectorNetworkAgent(inspected_frames); | 68 return new InspectorNetworkAgent(inspected_frames); |
69 } | 69 } |
70 | 70 |
71 void Restore() override; | 71 void Restore() override; |
72 | 72 |
73 ~InspectorNetworkAgent() override; | 73 ~InspectorNetworkAgent() override; |
74 DECLARE_VIRTUAL_TRACE(); | 74 DECLARE_VIRTUAL_TRACE(); |
75 | 75 |
76 // Probes. | 76 // Probes. |
77 void DidBlockRequest(LocalFrame*, | 77 void DidBlockRequest(const ResourceRequest&, |
78 const ResourceRequest&, | |
79 DocumentLoader*, | 78 DocumentLoader*, |
80 const FetchInitiatorInfo&, | 79 const FetchInitiatorInfo&, |
81 ResourceRequestBlockedReason); | 80 ResourceRequestBlockedReason); |
82 void DidChangeResourcePriority(unsigned long identifier, | 81 void DidChangeResourcePriority(unsigned long identifier, |
83 ResourceLoadPriority); | 82 ResourceLoadPriority); |
84 void WillSendRequest(LocalFrame*, | 83 void WillSendRequest(unsigned long identifier, |
85 unsigned long identifier, | |
86 DocumentLoader*, | 84 DocumentLoader*, |
87 ResourceRequest&, | 85 ResourceRequest&, |
88 const ResourceResponse& redirect_response, | 86 const ResourceResponse& redirect_response, |
89 const FetchInitiatorInfo&); | 87 const FetchInitiatorInfo&); |
90 void MarkResourceAsCached(unsigned long identifier); | 88 void MarkResourceAsCached(unsigned long identifier); |
91 void DidReceiveResourceResponse(LocalFrame*, | 89 void DidReceiveResourceResponse(unsigned long identifier, |
92 unsigned long identifier, | |
93 DocumentLoader*, | 90 DocumentLoader*, |
94 const ResourceResponse&, | 91 const ResourceResponse&, |
95 Resource*); | 92 Resource*); |
96 void DidReceiveData(LocalFrame*, | 93 void DidReceiveData(unsigned long identifier, |
97 unsigned long identifier, | 94 DocumentLoader*, |
98 const char* data, | 95 const char* data, |
99 int data_length); | 96 int data_length); |
100 void DidReceiveEncodedDataLength(LocalFrame*, | 97 void DidReceiveEncodedDataLength(unsigned long identifier, |
101 unsigned long identifier, | |
102 int encoded_data_length); | 98 int encoded_data_length); |
103 void DidFinishLoading(LocalFrame*, | 99 void DidFinishLoading(unsigned long identifier, |
104 unsigned long identifier, | 100 DocumentLoader*, |
105 double monotonic_finish_time, | 101 double monotonic_finish_time, |
106 int64_t encoded_data_length, | 102 int64_t encoded_data_length, |
107 int64_t decoded_body_length); | 103 int64_t decoded_body_length); |
108 void DidReceiveCORSRedirectResponse(LocalFrame*, | 104 void DidReceiveCORSRedirectResponse(LocalFrame*, |
109 unsigned long identifier, | 105 unsigned long identifier, |
110 DocumentLoader*, | 106 DocumentLoader*, |
111 const ResourceResponse&, | 107 const ResourceResponse&, |
112 Resource*); | 108 Resource*); |
113 void DidFailLoading(unsigned long identifier, const ResourceError&); | 109 void DidFailLoading(unsigned long identifier, const ResourceError&); |
114 void DidCommitLoad(LocalFrame*, DocumentLoader*); | 110 void DidCommitLoad(LocalFrame*, DocumentLoader*); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 bool FetchResourceContent(Document*, | 222 bool FetchResourceContent(Document*, |
227 const KURL&, | 223 const KURL&, |
228 String* content, | 224 String* content, |
229 bool* base64_encoded); | 225 bool* base64_encoded); |
230 bool CacheDisabled(); | 226 bool CacheDisabled(); |
231 | 227 |
232 private: | 228 private: |
233 explicit InspectorNetworkAgent(InspectedFrames*); | 229 explicit InspectorNetworkAgent(InspectedFrames*); |
234 | 230 |
235 void Enable(int total_buffer_size, int resource_buffer_size); | 231 void Enable(int total_buffer_size, int resource_buffer_size); |
236 void WillSendRequestInternal(LocalFrame*, | 232 void WillSendRequestInternal(unsigned long identifier, |
237 unsigned long identifier, | |
238 DocumentLoader*, | 233 DocumentLoader*, |
239 const ResourceRequest&, | 234 const ResourceRequest&, |
240 const ResourceResponse& redirect_response, | 235 const ResourceResponse& redirect_response, |
241 const FetchInitiatorInfo&); | 236 const FetchInitiatorInfo&); |
242 void DelayedRemoveReplayXHR(XMLHttpRequest*); | 237 void DelayedRemoveReplayXHR(XMLHttpRequest*); |
243 void RemoveFinishedReplayXHRFired(TimerBase*); | 238 void RemoveFinishedReplayXHRFired(TimerBase*); |
244 void DidFinishXHRInternal(ExecutionContext*, | 239 void DidFinishXHRInternal(ExecutionContext*, |
245 XMLHttpRequest*, | 240 XMLHttpRequest*, |
246 ThreadableLoaderClient*, | 241 ThreadableLoaderClient*, |
247 const AtomicString&, | 242 const AtomicString&, |
(...skipping 22 matching lines...) Expand all Loading... |
270 Member<XHRReplayData> pending_xhr_replay_data_; | 265 Member<XHRReplayData> pending_xhr_replay_data_; |
271 | 266 |
272 typedef HashMap<String, std::unique_ptr<protocol::Network::Initiator>> | 267 typedef HashMap<String, std::unique_ptr<protocol::Network::Initiator>> |
273 FrameNavigationInitiatorMap; | 268 FrameNavigationInitiatorMap; |
274 FrameNavigationInitiatorMap frame_navigation_initiator_map_; | 269 FrameNavigationInitiatorMap frame_navigation_initiator_map_; |
275 HashSet<String> frames_with_scheduled_navigation_; | 270 HashSet<String> frames_with_scheduled_navigation_; |
276 HashSet<String> frames_with_scheduled_client_navigation_; | 271 HashSet<String> frames_with_scheduled_client_navigation_; |
277 | 272 |
278 HeapHashSet<Member<XMLHttpRequest>> replay_xhrs_; | 273 HeapHashSet<Member<XMLHttpRequest>> replay_xhrs_; |
279 HeapHashSet<Member<XMLHttpRequest>> replay_xhrs_to_be_deleted_; | 274 HeapHashSet<Member<XMLHttpRequest>> replay_xhrs_to_be_deleted_; |
280 TaskRunnerTimer<InspectorNetworkAgent> remove_finished_replay_xhr_timer_; | 275 std::unique_ptr<TaskRunnerTimer<InspectorNetworkAgent>> |
| 276 remove_finished_replay_xhr_timer_; |
281 }; | 277 }; |
282 | 278 |
283 } // namespace blink | 279 } // namespace blink |
284 | 280 |
285 #endif // !defined(InspectorNetworkAgent_h) | 281 #endif // !defined(InspectorNetworkAgent_h) |
OLD | NEW |