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

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

Issue 306053010: Tried using CrossThreadPersistent for workerDebuggerAgents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 class XHRReplayData; 66 class XHRReplayData;
67 class XMLHttpRequest; 67 class XMLHttpRequest;
68 68
69 class WebSocketHandshakeRequest; 69 class WebSocketHandshakeRequest;
70 class WebSocketHandshakeResponse; 70 class WebSocketHandshakeResponse;
71 71
72 typedef String ErrorString; 72 typedef String ErrorString;
73 73
74 class InspectorResourceAgent FINAL : public InspectorBaseAgent<InspectorResource Agent>, public InspectorBackendDispatcher::NetworkCommandHandler { 74 class InspectorResourceAgent FINAL : public InspectorBaseAgent<InspectorResource Agent>, public InspectorBackendDispatcher::NetworkCommandHandler {
75 public: 75 public:
76 static PassOwnPtr<InspectorResourceAgent> create(InspectorPageAgent* pageAge nt) 76 static PassOwnPtrWillBeRawPtr<InspectorResourceAgent> create(InspectorPageAg ent* pageAgent)
77 { 77 {
78 return adoptPtr(new InspectorResourceAgent(pageAgent)); 78 return adoptPtrWillBeNoop(new InspectorResourceAgent(pageAgent));
79 } 79 }
80 80
81 virtual void setFrontend(InspectorFrontend*) OVERRIDE; 81 virtual void setFrontend(InspectorFrontend*) OVERRIDE;
82 virtual void clearFrontend() OVERRIDE; 82 virtual void clearFrontend() OVERRIDE;
83 virtual void restore() OVERRIDE; 83 virtual void restore() OVERRIDE;
84 84
85 virtual ~InspectorResourceAgent(); 85 virtual ~InspectorResourceAgent();
86 virtual void trace(Visitor*) OVERRIDE;
86 87
87 // Called from instrumentation. 88 // Called from instrumentation.
88 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&); 89 void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequ est&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&);
89 void markResourceAsCached(unsigned long identifier); 90 void markResourceAsCached(unsigned long identifier);
90 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum entLoader*, const ResourceResponse&, ResourceLoader*); 91 void didReceiveResourceResponse(LocalFrame*, unsigned long identifier, Docum entLoader*, const ResourceResponse&, ResourceLoader*);
91 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength); 92 void didReceiveData(LocalFrame*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
92 void didFinishLoading(unsigned long identifier, DocumentLoader*, double mono tonicFinishTime, int64_t encodedDataLength); 93 void didFinishLoading(unsigned long identifier, DocumentLoader*, double mono tonicFinishTime, int64_t encodedDataLength);
93 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D ocumentLoader*, const ResourceResponse&, ResourceLoader*); 94 void didReceiveCORSRedirectResponse(LocalFrame*, unsigned long identifier, D ocumentLoader*, const ResourceResponse&, ResourceLoader*);
94 void didFailLoading(unsigned long identifier, const ResourceError&); 95 void didFailLoading(unsigned long identifier, const ResourceError&);
95 void didCommitLoad(LocalFrame*, DocumentLoader*); 96 void didCommitLoad(LocalFrame*, DocumentLoader*);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 virtual void loadResourceForFrontend(ErrorString*, const String& frameId, co nst String& url, const RefPtr<JSONObject>* requestHeaders, PassRefPtr<LoadResour ceForFrontendCallback>) OVERRIDE; 143 virtual void loadResourceForFrontend(ErrorString*, const String& frameId, co nst String& url, const RefPtr<JSONObject>* requestHeaders, PassRefPtr<LoadResour ceForFrontendCallback>) OVERRIDE;
143 144
144 // Called from other agents. 145 // Called from other agents.
145 bool fetchResourceContent(LocalFrame*, const KURL&, String* content, bool* b ase64Encoded); 146 bool fetchResourceContent(LocalFrame*, const KURL&, String* content, bool* b ase64Encoded);
146 147
147 private: 148 private:
148 InspectorResourceAgent(InspectorPageAgent*); 149 InspectorResourceAgent(InspectorPageAgent*);
149 150
150 void enable(); 151 void enable();
151 152
152 InspectorPageAgent* m_pageAgent; 153 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
153 InspectorFrontend::Network* m_frontend; 154 InspectorFrontend::Network* m_frontend;
154 String m_userAgentOverride; 155 String m_userAgentOverride;
155 OwnPtr<NetworkResourcesData> m_resourcesData; 156 OwnPtr<NetworkResourcesData> m_resourcesData;
156 157
157 typedef HashMap<ThreadableLoaderClient*, RefPtr<XHRReplayData> > PendingXHRR eplayDataMap; 158 typedef HashMap<ThreadableLoaderClient*, RefPtr<XHRReplayData> > PendingXHRR eplayDataMap;
158 PendingXHRReplayDataMap m_pendingXHRReplayData; 159 PendingXHRReplayDataMap m_pendingXHRReplayData;
159 160
160 typedef HashMap<String, RefPtr<TypeBuilder::Network::Initiator> > FrameNavig ationInitiatorMap; 161 typedef HashMap<String, RefPtr<TypeBuilder::Network::Initiator> > FrameNavig ationInitiatorMap;
161 FrameNavigationInitiatorMap m_frameNavigationInitiatorMap; 162 FrameNavigationInitiatorMap m_frameNavigationInitiatorMap;
162 163
163 // FIXME: InspectorResourceAgent should now be aware of style recalculation. 164 // FIXME: InspectorResourceAgent should now be aware of style recalculation.
164 RefPtr<TypeBuilder::Network::Initiator> m_styleRecalculationInitiator; 165 RefPtr<TypeBuilder::Network::Initiator> m_styleRecalculationInitiator;
165 bool m_isRecalculatingStyle; 166 bool m_isRecalculatingStyle;
166 }; 167 };
167 168
168 } // namespace WebCore 169 } // namespace WebCore
169 170
170 171
171 #endif // !defined(InspectorResourceAgent_h) 172 #endif // !defined(InspectorResourceAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorProfilerAgent.cpp ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698