Chromium Code Reviews| Index: Source/core/inspector/InspectorResourceAgent.h |
| diff --git a/Source/core/inspector/InspectorResourceAgent.h b/Source/core/inspector/InspectorResourceAgent.h |
| index a97776d275fa088e962dca4b72bbbf10579c39db..bb5555453f348cf4fb4a8558ea554270aa1745df 100644 |
| --- a/Source/core/inspector/InspectorResourceAgent.h |
| +++ b/Source/core/inspector/InspectorResourceAgent.h |
| @@ -70,9 +70,16 @@ typedef String ErrorString; |
| class CORE_EXPORT InspectorResourceAgent final : public InspectorBaseAgent<InspectorResourceAgent, InspectorFrontend::Network>, public InspectorBackendDispatcher::NetworkCommandHandler { |
| public: |
| - static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAgent* pageAgent) |
| + class Client { |
| + public: |
| + virtual ~Client() { } |
| + |
| + virtual void flushPendingProtocolNotifications() { } |
|
pfeldman
2015/06/15 15:21:00
Lets make it available to the InspectorBaseAgent::
dgozman
2015/06/15 15:56:12
Found InspectorFrotendChannel::flush.
|
| + }; |
| + |
| + static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAgent* pageAgent, Client* client) |
| { |
| - return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent)); |
| + return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent, client)); |
| } |
| void disable(ErrorString*) override; |
| @@ -146,7 +153,7 @@ public: |
| bool fetchResourceContent(Document*, const KURL&, String* content, bool* base64Encoded); |
| private: |
| - explicit InspectorResourceAgent(InspectorPageAgent*); |
| + InspectorResourceAgent(InspectorPageAgent*, Client*); |
| void enable(); |
| void delayedRemoveReplayXHR(XMLHttpRequest*); |
| @@ -155,6 +162,7 @@ private: |
| bool getResponseBodyBlob(const String& requestId, PassRefPtrWillBeRawPtr<GetResponseBodyCallback>); |
| RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| + Client* m_client; |
| String m_userAgentOverride; |
| String m_hostId; |
| OwnPtr<NetworkResourcesData> m_resourcesData; |
| @@ -162,8 +170,8 @@ private: |
| // Stores the data for replaying XHR until an identifier for the load is |
| // generated by the loader and passed to the inspector via the |
| // documentThreadableLoaderStartedLoadingForClient() method. |
| - typedef WillBeHeapHashMap<ThreadableLoaderClient*, RefPtrWillBeMember<XHRReplayData> > PendingXHRReplayDataMap; |
| - PendingXHRReplayDataMap m_pendingXHRReplayData; |
| + ThreadableLoaderClient* m_pendingXHR; |
| + RefPtrWillBeMember<XHRReplayData> m_pendingXHRReplayData; |
| // Stores the pointer to the ThreadableLoaderClient for an EventSource |
| // (actually, the EventSource instance itself) for which a loader is being |