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

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: 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
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); 76 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent));
77 } 77 }
78 78
79 void disable(ErrorString*) override; 79 void disable(ErrorString*) override;
80 void restore() override; 80 void restore() override;
81 81
82 ~InspectorResourceAgent() override; 82 ~InspectorResourceAgent() override;
83 DECLARE_VIRTUAL_TRACE(); 83 DECLARE_VIRTUAL_TRACE();
84 84
85 // Called from instrumentation. 85 // Called from instrumentation.
86 bool shouldBlockRequest(const ResourceRequest&);
pfeldman 2015/08/21 01:38:45 Can we make it the other way around where devtools
86 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&); 87 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&);
87 void markResourceAsCached(unsigned long identifier); 88 void markResourceAsCached(unsigned long identifier);
88 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum entLoader*, const ResourceResponse&, ResourceLoader*); 89 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); 90 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
90 void didFinishLoading(unsigned long identifier, double monotonicFinishTime, int64_t encodedDataLength); 91 void didFinishLoading(unsigned long identifier, double monotonicFinishTime, int64_t encodedDataLength);
91 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D ocumentLoader*, const ResourceResponse&, ResourceLoader*); 92 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D ocumentLoader*, const ResourceResponse&, ResourceLoader*);
92 void didFailLoading(unsigned long identifier, const ResourceError&); 93 void didFailLoading(unsigned long identifier, const ResourceError&);
93 void didCommitLoad(LocalFrame*, DocumentLoader*); 94 void didCommitLoad(LocalFrame*, DocumentLoader*);
94 void scriptImported(unsigned long identifier, const String& sourceString); 95 void scriptImported(unsigned long identifier, const String& sourceString);
95 void didReceiveScriptResponse(unsigned long identifier); 96 void didReceiveScriptResponse(unsigned long identifier);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void didCloseWebSocket(Document*, unsigned long identifier); 129 void didCloseWebSocket(Document*, unsigned long identifier);
129 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas ked, const char* payload, size_t payloadLength); 130 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); 131 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked , const char* payload, size_t payloadLength);
131 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); 132 void didReceiveWebSocketFrameError(unsigned long identifier, const String&);
132 133
133 // Called from frontend 134 // Called from frontend
134 void enable(ErrorString*) override; 135 void enable(ErrorString*) override;
135 void setUserAgentOverride(ErrorString*, const String& userAgent) override; 136 void setUserAgentOverride(ErrorString*, const String& userAgent) override;
136 void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) override; 137 void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) override;
137 void getResponseBody(ErrorString*, const String& requestId, PassRefPtrWillBe RawPtr<GetResponseBodyCallback>) override; 138 void getResponseBody(ErrorString*, const String& requestId, PassRefPtrWillBe RawPtr<GetResponseBodyCallback>) override;
139 void addBlockedURL(ErrorString*, const String& url) override;
140 void removeBlockedURL(ErrorString*, const String& url) override;
138 141
139 void replayXHR(ErrorString*, const String& requestId) override; 142 void replayXHR(ErrorString*, const String& requestId) override;
140 void setMonitoringXHREnabled(ErrorString*, bool) override; 143 void setMonitoringXHREnabled(ErrorString*, bool) override;
141 144
142 void canClearBrowserCache(ErrorString*, bool*) override; 145 void canClearBrowserCache(ErrorString*, bool*) override;
143 void canClearBrowserCookies(ErrorString*, bool*) override; 146 void canClearBrowserCookies(ErrorString*, bool*) override;
144 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov erride; 147 void emulateNetworkConditions(ErrorString*, bool, double, double, double) ov erride;
145 void setCacheDisabled(ErrorString*, bool cacheDisabled) override; 148 void setCacheDisabled(ErrorString*, bool cacheDisabled) override;
146 149
147 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o verride; 150 void setDataSizeLimitsForTest(ErrorString*, int maxTotal, int maxResource) o verride;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « Source/core/inspector/InspectorInstrumentation.idl ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698