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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 class CORE_EXPORT InspectorResourceAgent final : public InspectorBaseAgent<Inspe
ctorResourceAgent, InspectorFrontend::Network>, public InspectorBackendDispatche
r::NetworkCommandHandler { | 71 class CORE_EXPORT InspectorResourceAgent final : public InspectorBaseAgent<Inspe
ctorResourceAgent, InspectorFrontend::Network>, public InspectorBackendDispatche
r::NetworkCommandHandler { |
72 public: | 72 public: |
73 static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAg
ent* pageAgent) | 73 static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAg
ent* pageAgent) |
74 { | 74 { |
75 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); | 75 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); |
76 } | 76 } |
77 | 77 |
78 void disable(ErrorString*) override; | 78 void disable(ErrorString*) override; |
79 void restore() override; | 79 void restore() override; |
80 | 80 |
81 virtual ~InspectorResourceAgent(); | 81 ~InspectorResourceAgent() override; |
82 DECLARE_VIRTUAL_TRACE(); | 82 DECLARE_VIRTUAL_TRACE(); |
83 | 83 |
84 // Called from instrumentation. | 84 // Called from instrumentation. |
85 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ
est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&); | 85 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ
est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&); |
86 void markResourceAsCached(unsigned long identifier); | 86 void markResourceAsCached(unsigned long identifier); |
87 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum
entLoader*, const ResourceResponse&, ResourceLoader*); | 87 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum
entLoader*, const ResourceResponse&, ResourceLoader*); |
88 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data,
int dataLength, int encodedDataLength); | 88 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data,
int dataLength, int encodedDataLength); |
89 void didFinishLoading(unsigned long identifier, double monotonicFinishTime,
int64_t encodedDataLength); | 89 void didFinishLoading(unsigned long identifier, double monotonicFinishTime,
int64_t encodedDataLength); |
90 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D
ocumentLoader*, const ResourceResponse&, ResourceLoader*); | 90 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D
ocumentLoader*, const ResourceResponse&, ResourceLoader*); |
91 void didFailLoading(unsigned long identifier, const ResourceError&); | 91 void didFailLoading(unsigned long identifier, const ResourceError&); |
(...skipping 27 matching lines...) Expand all Loading... |
119 | 119 |
120 void didCreateWebSocket(Document*, unsigned long identifier, const KURL& req
uestURL, const String&); | 120 void didCreateWebSocket(Document*, unsigned long identifier, const KURL& req
uestURL, const String&); |
121 void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier,
const WebSocketHandshakeRequest*); | 121 void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier,
const WebSocketHandshakeRequest*); |
122 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie
r, const WebSocketHandshakeRequest*, const WebSocketHandshakeResponse*); | 122 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie
r, const WebSocketHandshakeRequest*, const WebSocketHandshakeResponse*); |
123 void didCloseWebSocket(Document*, unsigned long identifier); | 123 void didCloseWebSocket(Document*, unsigned long identifier); |
124 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas
ked, const char* payload, size_t payloadLength); | 124 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas
ked, const char* payload, size_t payloadLength); |
125 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked
, const char* payload, size_t payloadLength); | 125 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked
, const char* payload, size_t payloadLength); |
126 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); | 126 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); |
127 | 127 |
128 // Called from frontend | 128 // Called from frontend |
129 virtual void enable(ErrorString*) override; | 129 void enable(ErrorString*) override; |
130 virtual void setUserAgentOverride(ErrorString*, const String& userAgent) ove
rride; | 130 void setUserAgentOverride(ErrorString*, const String& userAgent) override; |
131 virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) ov
erride; | 131 void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) override; |
132 virtual void getResponseBody(ErrorString*, const String& requestId, PassRefP
trWillBeRawPtr<GetResponseBodyCallback>) override; | 132 void getResponseBody(ErrorString*, const String& requestId, PassRefPtrWillBe
RawPtr<GetResponseBodyCallback>) override; |
133 | 133 |
134 virtual void replayXHR(ErrorString*, const String& requestId) override; | 134 void replayXHR(ErrorString*, const String& requestId) override; |
135 virtual void setMonitoringXHREnabled(ErrorString*, bool) override; | 135 void setMonitoringXHREnabled(ErrorString*, bool) override; |
136 | 136 |
137 virtual void canClearBrowserCache(ErrorString*, bool*) override; | 137 void canClearBrowserCache(ErrorString*, bool*) override; |
138 virtual void canClearBrowserCookies(ErrorString*, bool*) override; | 138 void canClearBrowserCookies(ErrorString*, bool*) override; |
139 virtual void emulateNetworkConditions(ErrorString*, bool, double, double, do
uble) override; | 139 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov
erride; |
140 virtual void setCacheDisabled(ErrorString*, bool cacheDisabled) override; | 140 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; |
141 | 141 |
142 virtual void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxRes
ource) override; | 142 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o
verride; |
143 | 143 |
144 // Called from other agents. | 144 // Called from other agents. |
145 void setHostId(const String&); | 145 void setHostId(const String&); |
146 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); | 146 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); |
147 | 147 |
148 private: | 148 private: |
149 explicit InspectorResourceAgent(InspectorPageAgent*); | 149 explicit InspectorResourceAgent(InspectorPageAgent*); |
150 | 150 |
151 void enable(); | 151 void enable(); |
152 void delayedRemoveReplayXHR(XMLHttpRequest*); | 152 void delayedRemoveReplayXHR(XMLHttpRequest*); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; | 192 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; |
193 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT
oBeDeleted; | 193 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT
oBeDeleted; |
194 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; | 194 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; |
195 }; | 195 }; |
196 | 196 |
197 } // namespace blink | 197 } // namespace blink |
198 | 198 |
199 | 199 |
200 #endif // !defined(InspectorResourceAgent_h) | 200 #endif // !defined(InspectorResourceAgent_h) |
OLD | NEW |