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

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

Issue 1295903005: [DevTools] Implementation of resource requests blocked by specific urls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void didCloseWebSocket(Document*, unsigned long identifier); 128 void didCloseWebSocket(Document*, unsigned long identifier);
129 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas ked, const char* payload, size_t payloadLength); 129 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas ked, const char* payload, size_t payloadLength);
130 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked , const char* payload, size_t payloadLength); 130 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked , const char* payload, size_t payloadLength);
131 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); 131 void didReceiveWebSocketFrameError(unsigned long identifier, const String&);
132 132
133 // Called from frontend 133 // Called from frontend
134 void enable(ErrorString*) override; 134 void enable(ErrorString*) override;
135 void setUserAgentOverride(ErrorString*, const String& userAgent) override; 135 void setUserAgentOverride(ErrorString*, const String& userAgent) override;
136 void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) override; 136 void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) override;
137 void getResponseBody(ErrorString*, const String& requestId, PassRefPtrWillBe RawPtr<GetResponseBodyCallback>) override; 137 void getResponseBody(ErrorString*, const String& requestId, PassRefPtrWillBe RawPtr<GetResponseBodyCallback>) override;
138 void addBlockedURL(ErrorString*, const String& url) override;
139 void removeBlockedURL(ErrorString*, const String& url) override;
138 140
139 void replayXHR(ErrorString*, const String& requestId) override; 141 void replayXHR(ErrorString*, const String& requestId) override;
140 void setMonitoringXHREnabled(ErrorString*, bool) override; 142 void setMonitoringXHREnabled(ErrorString*, bool) override;
141 143
142 void canClearBrowserCache(ErrorString*, bool*) override; 144 void canClearBrowserCache(ErrorString*, bool*) override;
143 void canClearBrowserCookies(ErrorString*, bool*) override; 145 void canClearBrowserCookies(ErrorString*, bool*) override;
144 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov erride; 146 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov erride;
145 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; 147 void setCacheDisabled(ErrorString*, bool cacheDisabled) override;
146 148
147 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o verride; 149 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o verride;
148 150
149 // Called from other agents. 151 // Called from other agents.
150 void setHostId(const String&); 152 void setHostId(const String&);
151 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&);
152 155
153 private: 156 private:
154 explicit InspectorResourceAgent(InspectorPageAgent*); 157 explicit InspectorResourceAgent(InspectorPageAgent*);
155 158
156 void enable(); 159 void enable();
157 void delayedRemoveReplayXHR(XMLHttpRequest*); 160 void delayedRemoveReplayXHR(XMLHttpRequest*);
158 void removeFinishedReplayXHRFired(Timer<InspectorResourceAgent>*); 161 void removeFinishedReplayXHRFired(Timer<InspectorResourceAgent>*);
159 void didFinishXHRInternal(ExecutionContext*, XMLHttpRequest*, ThreadableLoad erClient*, const AtomicString&, const String&, bool); 162 void didFinishXHRInternal(ExecutionContext*, XMLHttpRequest*, ThreadableLoad erClient*, const AtomicString&, const String&, bool);
160 163
161 bool getResponseBodyBlob(const String& requestId, PassRefPtrWillBeRawPtr<Get ResponseBodyCallback>); 164 bool getResponseBodyBlob(const String& requestId, PassRefPtrWillBeRawPtr<Get ResponseBodyCallback>);
(...skipping 23 matching lines...) Expand all
185 188
186 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs; 189 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRs;
187 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT oBeDeleted; 190 PersistentHeapHashSetWillBeHeapHashSet<Member<XMLHttpRequest>> m_replayXHRsT oBeDeleted;
188 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; 191 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer;
189 }; 192 };
190 193
191 } // namespace blink 194 } // namespace blink
192 195
193 196
194 #endif // !defined(InspectorResourceAgent_h) 197 #endif // !defined(InspectorResourceAgent_h)
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698