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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef InspectorResourceAgent_h | 31 #ifndef InspectorResourceAgent_h |
32 #define InspectorResourceAgent_h | 32 #define InspectorResourceAgent_h |
33 | 33 |
34 #include "bindings/core/v8/ScriptString.h" | 34 #include "bindings/core/v8/ScriptString.h" |
35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
36 #include "core/InspectorFrontend.h" | 36 #include "core/InspectorFrontend.h" |
37 #include "core/inspector/InspectorBaseAgent.h" | 37 #include "core/inspector/InspectorBaseAgent.h" |
| 38 #include "core/inspector/InspectorInstrumentation.h" |
38 #include "core/inspector/InspectorPageAgent.h" | 39 #include "core/inspector/InspectorPageAgent.h" |
39 #include "platform/Timer.h" | 40 #include "platform/Timer.h" |
40 #include "platform/heap/Handle.h" | 41 #include "platform/heap/Handle.h" |
41 #include "wtf/PassOwnPtr.h" | 42 #include "wtf/PassOwnPtr.h" |
42 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
43 | 44 |
44 namespace blink { | 45 namespace blink { |
45 | 46 |
46 class Resource; | 47 class Resource; |
47 struct FetchInitiatorInfo; | 48 struct FetchInitiatorInfo; |
(...skipping 28 matching lines...) Expand all Loading... |
76 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); | 77 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); |
77 } | 78 } |
78 | 79 |
79 void disable(ErrorString*) override; | 80 void disable(ErrorString*) override; |
80 void restore() override; | 81 void restore() override; |
81 | 82 |
82 ~InspectorResourceAgent() override; | 83 ~InspectorResourceAgent() override; |
83 DECLARE_VIRTUAL_TRACE(); | 84 DECLARE_VIRTUAL_TRACE(); |
84 | 85 |
85 // Called from instrumentation. | 86 // Called from instrumentation. |
| 87 void didBlockRequest(LocalFrame*, const ResourceRequest&, DocumentLoader*, c
onst FetchInitiatorInfo&, InspectorRequestBlockedReason); |
86 void willSendRequest(LocalFrame*, unsigned long identifier, DocumentLoader*,
ResourceRequest&, const ResourceResponse& redirectResponse, const FetchInitiato
rInfo&); | 88 void willSendRequest(LocalFrame*, unsigned long identifier, DocumentLoader*,
ResourceRequest&, const ResourceResponse& redirectResponse, const FetchInitiato
rInfo&); |
87 void markResourceAsCached(unsigned long identifier); | 89 void markResourceAsCached(unsigned long identifier); |
88 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum
entLoader*, const ResourceResponse&, ResourceLoader*); | 90 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum
entLoader*, const ResourceResponse&, ResourceLoader*); |
89 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data,
int dataLength, int encodedDataLength); | 91 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data,
int dataLength, int encodedDataLength); |
90 void didFinishLoading(unsigned long identifier, double monotonicFinishTime,
int64_t encodedDataLength); | 92 void didFinishLoading(unsigned long identifier, double monotonicFinishTime,
int64_t encodedDataLength); |
91 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D
ocumentLoader*, const ResourceResponse&, ResourceLoader*); | 93 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D
ocumentLoader*, const ResourceResponse&, ResourceLoader*); |
92 void didFailLoading(unsigned long identifier, const ResourceError&); | 94 void didFailLoading(unsigned long identifier, const ResourceError&); |
93 void didCommitLoad(LocalFrame*, DocumentLoader*); | 95 void didCommitLoad(LocalFrame*, DocumentLoader*); |
94 void scriptImported(unsigned long identifier, const String& sourceString); | 96 void scriptImported(unsigned long identifier, const String& sourceString); |
95 void didReceiveScriptResponse(unsigned long identifier); | 97 void didReceiveScriptResponse(unsigned long identifier); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 void canClearBrowserCache(ErrorString*, bool*) override; | 146 void canClearBrowserCache(ErrorString*, bool*) override; |
145 void canClearBrowserCookies(ErrorString*, bool*) override; | 147 void canClearBrowserCookies(ErrorString*, bool*) override; |
146 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov
erride; | 148 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov
erride; |
147 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; | 149 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; |
148 | 150 |
149 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o
verride; | 151 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o
verride; |
150 | 152 |
151 // Called from other agents. | 153 // Called from other agents. |
152 void setHostId(const String&); | 154 void setHostId(const String&); |
153 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); | 155 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); |
154 bool shouldBlockRequest(LocalFrame*, const ResourceRequest&, DocumentLoader*
, const FetchInitiatorInfo&); | 156 bool shouldBlockRequest(const ResourceRequest&); |
155 | 157 |
156 private: | 158 private: |
157 explicit InspectorResourceAgent(InspectorPageAgent*); | 159 explicit InspectorResourceAgent(InspectorPageAgent*); |
158 | 160 |
159 void enable(); | 161 void enable(); |
160 void willSendRequestInternal(LocalFrame*, unsigned long identifier, Document
Loader*, const ResourceRequest&, const ResourceResponse& redirectResponse, const
FetchInitiatorInfo&); | 162 void willSendRequestInternal(LocalFrame*, unsigned long identifier, Document
Loader*, const ResourceRequest&, const ResourceResponse& redirectResponse, const
FetchInitiatorInfo&); |
161 void delayedRemoveReplayXHR(XMLHttpRequest*); | 163 void delayedRemoveReplayXHR(XMLHttpRequest*); |
162 void removeFinishedReplayXHRFired(Timer<InspectorResourceAgent>*); | 164 void removeFinishedReplayXHRFired(Timer<InspectorResourceAgent>*); |
163 void didFinishXHRInternal(ExecutionContext*, XMLHttpRequest*, ThreadableLoad
erClient*, const AtomicString&, const String&, bool); | 165 void didFinishXHRInternal(ExecutionContext*, XMLHttpRequest*, ThreadableLoad
erClient*, const AtomicString&, const String&, bool); |
164 | 166 |
(...skipping 24 matching lines...) Expand all Loading... |
189 | 191 |
190 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; | 192 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; |
191 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT
oBeDeleted; | 193 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT
oBeDeleted; |
192 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; | 194 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; |
193 }; | 195 }; |
194 | 196 |
195 } // namespace blink | 197 } // namespace blink |
196 | 198 |
197 | 199 |
198 #endif // !defined(InspectorResourceAgent_h) | 200 #endif // !defined(InspectorResourceAgent_h) |
OLD | NEW |