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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 class ResourceResponse; | 65 class ResourceResponse; |
66 class ThreadableLoaderClient; | 66 class ThreadableLoaderClient; |
67 class XHRReplayData; | 67 class XHRReplayData; |
68 class XMLHttpRequest; | 68 class XMLHttpRequest; |
69 | 69 |
70 class WebSocketHandshakeRequest; | 70 class WebSocketHandshakeRequest; |
71 class WebSocketHandshakeResponse; | 71 class WebSocketHandshakeResponse; |
72 | 72 |
73 typedef String ErrorString; | 73 typedef String ErrorString; |
74 | 74 |
75 class InspectorResourceAgent FINAL : public InspectorBaseAgent<InspectorResource
Agent>, public InspectorBackendDispatcher::NetworkCommandHandler { | 75 class InspectorResourceAgent final : public InspectorBaseAgent<InspectorResource
Agent>, public InspectorBackendDispatcher::NetworkCommandHandler { |
76 public: | 76 public: |
77 static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAg
ent* pageAgent) | 77 static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAg
ent* pageAgent) |
78 { | 78 { |
79 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); | 79 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); |
80 } | 80 } |
81 | 81 |
82 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 82 virtual void setFrontend(InspectorFrontend*) override; |
83 virtual void clearFrontend() OVERRIDE; | 83 virtual void clearFrontend() override; |
84 virtual void restore() OVERRIDE; | 84 virtual void restore() override; |
85 | 85 |
86 virtual ~InspectorResourceAgent(); | 86 virtual ~InspectorResourceAgent(); |
87 virtual void trace(Visitor*) OVERRIDE; | 87 virtual void trace(Visitor*) override; |
88 | 88 |
89 // Called from instrumentation. | 89 // Called from instrumentation. |
90 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ
est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&); | 90 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ
est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&); |
91 void markResourceAsCached(unsigned long identifier); | 91 void markResourceAsCached(unsigned long identifier); |
92 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum
entLoader*, const ResourceResponse&, ResourceLoader*); | 92 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum
entLoader*, const ResourceResponse&, ResourceLoader*); |
93 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data,
int dataLength, int encodedDataLength); | 93 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data,
int dataLength, int encodedDataLength); |
94 void didFinishLoading(unsigned long identifier, DocumentLoader*, double mono
tonicFinishTime, int64_t encodedDataLength); | 94 void didFinishLoading(unsigned long identifier, DocumentLoader*, double mono
tonicFinishTime, int64_t encodedDataLength); |
95 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D
ocumentLoader*, const ResourceResponse&, ResourceLoader*); | 95 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D
ocumentLoader*, const ResourceResponse&, ResourceLoader*); |
96 void didFailLoading(unsigned long identifier, const ResourceError&); | 96 void didFailLoading(unsigned long identifier, const ResourceError&); |
97 void didCommitLoad(LocalFrame*, DocumentLoader*); | 97 void didCommitLoad(LocalFrame*, DocumentLoader*); |
(...skipping 25 matching lines...) Expand all Loading... |
123 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie
r, const WebSocketHandshakeRequest*, const WebSocketHandshakeResponse*); | 123 void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifie
r, const WebSocketHandshakeRequest*, const WebSocketHandshakeResponse*); |
124 void didCloseWebSocket(Document*, unsigned long identifier); | 124 void didCloseWebSocket(Document*, unsigned long identifier); |
125 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas
ked, const char* payload, size_t payloadLength); | 125 void didReceiveWebSocketFrame(unsigned long identifier, int opCode, bool mas
ked, const char* payload, size_t payloadLength); |
126 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked
, const char* payload, size_t payloadLength); | 126 void didSendWebSocketFrame(unsigned long identifier, int opCode, bool masked
, const char* payload, size_t payloadLength); |
127 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); | 127 void didReceiveWebSocketFrameError(unsigned long identifier, const String&); |
128 | 128 |
129 // called from Internals for layout test purposes. | 129 // called from Internals for layout test purposes. |
130 void setResourcesDataSizeLimitsFromInternals(int maximumResourcesContentSize
, int maximumSingleResourceContentSize); | 130 void setResourcesDataSizeLimitsFromInternals(int maximumResourcesContentSize
, int maximumSingleResourceContentSize); |
131 | 131 |
132 // Called from frontend | 132 // Called from frontend |
133 virtual void enable(ErrorString*) OVERRIDE; | 133 virtual void enable(ErrorString*) override; |
134 virtual void disable(ErrorString*) OVERRIDE; | 134 virtual void disable(ErrorString*) override; |
135 virtual void setUserAgentOverride(ErrorString*, const String& userAgent) OVE
RRIDE; | 135 virtual void setUserAgentOverride(ErrorString*, const String& userAgent) ove
rride; |
136 virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) OV
ERRIDE; | 136 virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<JSONObject>&) ov
erride; |
137 virtual void getResponseBody(ErrorString*, const String& requestId, String*
content, bool* base64Encoded) OVERRIDE; | 137 virtual void getResponseBody(ErrorString*, const String& requestId, String*
content, bool* base64Encoded) override; |
138 | 138 |
139 virtual void replayXHR(ErrorString*, const String& requestId) OVERRIDE; | 139 virtual void replayXHR(ErrorString*, const String& requestId) override; |
140 | 140 |
141 virtual void canClearBrowserCache(ErrorString*, bool*) OVERRIDE; | 141 virtual void canClearBrowserCache(ErrorString*, bool*) override; |
142 virtual void canClearBrowserCookies(ErrorString*, bool*) OVERRIDE; | 142 virtual void canClearBrowserCookies(ErrorString*, bool*) override; |
143 virtual void emulateNetworkConditions(ErrorString*, bool, double, double, do
uble) OVERRIDE; | 143 virtual void emulateNetworkConditions(ErrorString*, bool, double, double, do
uble) override; |
144 virtual void setCacheDisabled(ErrorString*, bool cacheDisabled) OVERRIDE; | 144 virtual void setCacheDisabled(ErrorString*, bool cacheDisabled) override; |
145 | 145 |
146 virtual void loadResourceForFrontend(ErrorString*, const String& frameId, co
nst String& url, const RefPtr<JSONObject>* requestHeaders, PassRefPtrWillBeRawPt
r<LoadResourceForFrontendCallback>) OVERRIDE; | 146 virtual void loadResourceForFrontend(ErrorString*, const String& frameId, co
nst String& url, const RefPtr<JSONObject>* requestHeaders, PassRefPtrWillBeRawPt
r<LoadResourceForFrontendCallback>) override; |
147 | 147 |
148 // Called from other agents. | 148 // Called from other agents. |
149 void setHostId(const String&); | 149 void setHostId(const String&); |
150 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); | 150 bool fetchResourceContent(Document*, const KURL&, String* content, bool* bas
e64Encoded); |
151 | 151 |
152 private: | 152 private: |
153 explicit InspectorResourceAgent(InspectorPageAgent*); | 153 explicit InspectorResourceAgent(InspectorPageAgent*); |
154 | 154 |
155 void enable(); | 155 void enable(); |
156 void delayedRemoveReplayXHR(XMLHttpRequest*); | 156 void delayedRemoveReplayXHR(XMLHttpRequest*); |
(...skipping 17 matching lines...) Expand all Loading... |
174 | 174 |
175 WillBeHeapHashSet<RefPtrWillBeMember<XMLHttpRequest> > m_replayXHRs; | 175 WillBeHeapHashSet<RefPtrWillBeMember<XMLHttpRequest> > m_replayXHRs; |
176 WillBeHeapHashSet<RefPtrWillBeMember<XMLHttpRequest> > m_replayXHRsToBeDelet
ed; | 176 WillBeHeapHashSet<RefPtrWillBeMember<XMLHttpRequest> > m_replayXHRsToBeDelet
ed; |
177 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; | 177 Timer<InspectorResourceAgent> m_removeFinishedReplayXHRTimer; |
178 }; | 178 }; |
179 | 179 |
180 } // namespace blink | 180 } // namespace blink |
181 | 181 |
182 | 182 |
183 #endif // !defined(InspectorResourceAgent_h) | 183 #endif // !defined(InspectorResourceAgent_h) |
OLD | NEW |