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

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

Issue 1752213003: DevTools: migrate protocol dispatcher off RefPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 9 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698