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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 void didCloseWebSocket(Document*, unsigned long identifier); | 130 void didCloseWebSocket(Document*, unsigned long identifier); |
131 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas
ked, const char* payload, size_t payloadLength); | 131 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas
ked, const char* payload, size_t payloadLength); |
132 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked
, const char* payload, size_t payloadLength); | 132 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked
, const char* payload, size_t payloadLength); |
133 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); | 133 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); |
134 | 134 |
135 // Called from frontend | 135 // Called from frontend |
136 void enable(ErrorString*) override; | 136 void enable(ErrorString*) override; |
137 void disable(ErrorString*) override; | 137 void disable(ErrorString*) override; |
138 void setUserAgentOverride(ErrorString*, const String& userAgent) override; | 138 void setUserAgentOverride(ErrorString*, const String& userAgent) override; |
139 void setExtraHTTPHeaders(ErrorString*, PassOwnPtr<protocol::Network::Headers
>) override; | 139 void setExtraHTTPHeaders(ErrorString*, PassOwnPtr<protocol::Network::Headers
>) override; |
140 void getResponseBody(ErrorString*, const String& requestId, PassRefPtr<GetRe
sponseBodyCallback>) override; | 140 void getResponseBody(ErrorString*, const String& requestId, PassOwnPtr<GetRe
sponseBodyCallback>) override; |
141 void addBlockedURL(ErrorString*, const String& url) override; | 141 void addBlockedURL(ErrorString*, const String& url) override; |
142 void removeBlockedURL(ErrorString*, const String& url) override; | 142 void removeBlockedURL(ErrorString*, const String& url) override; |
143 void replayXHR(ErrorString*, const String& requestId) override; | 143 void replayXHR(ErrorString*, const String& requestId) override; |
144 void setMonitoringXHREnabled(ErrorString*, bool enabled) override; | 144 void setMonitoringXHREnabled(ErrorString*, bool enabled) override; |
145 void canClearBrowserCache(ErrorString*, bool* result) override; | 145 void canClearBrowserCache(ErrorString*, bool* result) override; |
146 void canClearBrowserCookies(ErrorString*, bool* result) override; | 146 void canClearBrowserCookies(ErrorString*, bool* result) override; |
147 void emulateNetworkConditions(ErrorString*, bool offline, double latency, do
uble downloadThroughput, double uploadThroughput) override; | 147 void emulateNetworkConditions(ErrorString*, bool offline, double latency, do
uble downloadThroughput, double uploadThroughput) override; |
148 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; | 148 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; |
149 void setDataSizeLimitsForTest(ErrorString*, int maxTotalSize, int maxResourc
eSize) override; | 149 void setDataSizeLimitsForTest(ErrorString*, int maxTotalSize, int maxResourc
eSize) override; |
150 | 150 |
151 // Called from other agents. | 151 // Called from other agents. |
152 void setHostId(const String&); | 152 void setHostId(const String&); |
153 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); | 153 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); |
154 bool shouldBlockRequest(const ResourceRequest&); | 154 bool shouldBlockRequest(const ResourceRequest&); |
155 | 155 |
156 private: | 156 private: |
157 explicit InspectorResourceAgent(InspectedFrames*); | 157 explicit InspectorResourceAgent(InspectedFrames*); |
158 | 158 |
159 void enable(); | 159 void enable(); |
160 void willSendRequestInternal(LocalFrame*, unsigned long identifier, Document
Loader*, const ResourceRequest&, const ResourceResponse& redirectResponse, const
FetchInitiatorInfo&); | 160 void willSendRequestInternal(LocalFrame*, unsigned long identifier, Document
Loader*, const ResourceRequest&, const ResourceResponse& redirectResponse, const
FetchInitiatorInfo&); |
161 void delayedRemoveReplayXHR(XMLHttpRequest*); | 161 void delayedRemoveReplayXHR(XMLHttpRequest*); |
162 void removeFinishedReplayXHRFired(Timer<InspectorResourceAgent>*); | 162 void removeFinishedReplayXHRFired(Timer<InspectorResourceAgent>*); |
163 void didFinishXHRInternal(ExecutionContext*, XMLHttpRequest*, ThreadableLoad
erClient*, const AtomicString&, const String&, bool); | 163 void didFinishXHRInternal(ExecutionContext*, XMLHttpRequest*, ThreadableLoad
erClient*, const AtomicString&, const String&, bool); |
164 | 164 |
165 bool getResponseBodyBlob(const String& requestId, PassRefPtr<GetResponseBody
Callback>); | 165 bool canGetResponseBodyBlob(const String& requestId); |
| 166 void getResponseBodyBlob(const String& requestId, PassOwnPtr<GetResponseBody
Callback>); |
166 | 167 |
167 RawPtrWillBeMember<InspectedFrames> m_inspectedFrames; | 168 RawPtrWillBeMember<InspectedFrames> m_inspectedFrames; |
168 String m_userAgentOverride; | 169 String m_userAgentOverride; |
169 String m_hostId; | 170 String m_hostId; |
170 OwnPtrWillBeMember<NetworkResourcesData> m_resourcesData; | 171 OwnPtrWillBeMember<NetworkResourcesData> m_resourcesData; |
171 | 172 |
172 typedef HashMap<ThreadableLoaderClient*, unsigned long> ThreadableLoaderClie
ntRequestIdMap; | 173 typedef HashMap<ThreadableLoaderClient*, unsigned long> ThreadableLoaderClie
ntRequestIdMap; |
173 | 174 |
174 // Stores the pending ThreadableLoaderClient till an identifier for | 175 // Stores the pending ThreadableLoaderClient till an identifier for |
175 // the load is generated by the loader and passed to the inspector | 176 // the load is generated by the loader and passed to the inspector |
(...skipping 13 matching lines...) Expand all Loading... |
189 | 190 |
190 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; | 191 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; |
191 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT
oBeDeleted; | 192 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT
oBeDeleted; |
192 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; | 193 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; |
193 }; | 194 }; |
194 | 195 |
195 } // namespace blink | 196 } // namespace blink |
196 | 197 |
197 | 198 |
198 #endif // !defined(InspectorResourceAgent_h) | 199 #endif // !defined(InspectorResourceAgent_h) |
OLD | NEW |