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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix 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 unified diff | Download patch
OLDNEW
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
67 static InspectorNetworkAgent* create(InspectedFrames* inspectedFrames) { 67 static InspectorNetworkAgent* create(InspectedFrames* inspectedFrames) {
68 return new InspectorNetworkAgent(inspectedFrames); 68 return new InspectorNetworkAgent(inspectedFrames);
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& redirectResponse, 86 const ResourceResponse& redirectResponse,
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 dataLength); 96 int dataLength);
100 void didReceiveEncodedDataLength(LocalFrame*, 97 void didReceiveEncodedDataLength(unsigned long identifier,
101 unsigned long identifier,
102 int encodedDataLength); 98 int encodedDataLength);
103 void didFinishLoading(LocalFrame*, 99 void didFinishLoading(unsigned long identifier,
104 unsigned long identifier, 100 DocumentLoader*,
105 double monotonicFinishTime, 101 double monotonicFinishTime,
106 int64_t encodedDataLength, 102 int64_t encodedDataLength,
107 int64_t decodedBodyLength); 103 int64_t decodedBodyLength);
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool fetchResourceContent(Document*, 223 bool fetchResourceContent(Document*,
228 const KURL&, 224 const KURL&,
229 String* content, 225 String* content,
230 bool* base64Encoded); 226 bool* base64Encoded);
231 bool cacheDisabled(); 227 bool cacheDisabled();
232 228
233 private: 229 private:
234 explicit InspectorNetworkAgent(InspectedFrames*); 230 explicit InspectorNetworkAgent(InspectedFrames*);
235 231
236 void enable(int totalBufferSize, int resourceBufferSize); 232 void enable(int totalBufferSize, int resourceBufferSize);
237 void willSendRequestInternal(LocalFrame*, 233 void willSendRequestInternal(unsigned long identifier,
238 unsigned long identifier,
239 DocumentLoader*, 234 DocumentLoader*,
240 const ResourceRequest&, 235 const ResourceRequest&,
241 const ResourceResponse& redirectResponse, 236 const ResourceResponse& redirectResponse,
242 const FetchInitiatorInfo&); 237 const FetchInitiatorInfo&);
243 void delayedRemoveReplayXHR(XMLHttpRequest*); 238 void delayedRemoveReplayXHR(XMLHttpRequest*);
244 void removeFinishedReplayXHRFired(TimerBase*); 239 void removeFinishedReplayXHRFired(TimerBase*);
245 void didFinishXHRInternal(ExecutionContext*, 240 void didFinishXHRInternal(ExecutionContext*,
246 XMLHttpRequest*, 241 XMLHttpRequest*,
247 ThreadableLoaderClient*, 242 ThreadableLoaderClient*,
248 const AtomicString&, 243 const AtomicString&,
(...skipping 22 matching lines...) Expand all
271 Member<XHRReplayData> m_pendingXHRReplayData; 266 Member<XHRReplayData> m_pendingXHRReplayData;
272 267
273 typedef HashMap<String, std::unique_ptr<protocol::Network::Initiator>> 268 typedef HashMap<String, std::unique_ptr<protocol::Network::Initiator>>
274 FrameNavigationInitiatorMap; 269 FrameNavigationInitiatorMap;
275 FrameNavigationInitiatorMap m_frameNavigationInitiatorMap; 270 FrameNavigationInitiatorMap m_frameNavigationInitiatorMap;
276 HashSet<String> m_framesWithScheduledNavigation; 271 HashSet<String> m_framesWithScheduledNavigation;
277 HashSet<String> m_framesWithScheduledClientNavigation; 272 HashSet<String> m_framesWithScheduledClientNavigation;
278 273
279 HeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; 274 HeapHashSet<Member<XMLHttpRequest>> m_replayXHRs;
280 HeapHashSet<Member<XMLHttpRequest>> m_replayXHRsToBeDeleted; 275 HeapHashSet<Member<XMLHttpRequest>> m_replayXHRsToBeDeleted;
281 TaskRunnerTimer<InspectorNetworkAgent> m_removeFinishedReplayXHRTimer; 276 std::unique_ptr<TaskRunnerTimer<InspectorNetworkAgent>>
277 m_removeFinishedReplayXHRTimer;
282 }; 278 };
283 279
284 } // namespace blink 280 } // namespace blink
285 281
286 #endif // !defined(InspectorNetworkAgent_h) 282 #endif // !defined(InspectorNetworkAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698