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

Side by Side Diff: Source/core/inspector/InspectorResourceContentLoader.cpp

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/inspector/InspectorResourceContentLoader.h" 6 #include "core/inspector/InspectorResourceContentLoader.h"
7 7
8 #include "core/FetchInitiatorTypeNames.h" 8 #include "core/FetchInitiatorTypeNames.h"
9 #include "core/css/CSSStyleSheet.h" 9 #include "core/css/CSSStyleSheet.h"
10 #include "core/css/StyleSheetContents.h" 10 #include "core/css/StyleSheetContents.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ResourcePtr<Resource> resource = document->fetcher()->fetchRawResour ce(request); 111 ResourcePtr<Resource> resource = document->fetcher()->fetchRawResour ce(request);
112 if (resource) { 112 if (resource) {
113 // Prevent garbage collection by holding a reference to this res ource. 113 // Prevent garbage collection by holding a reference to this res ource.
114 m_resources.append(resource.get()); 114 m_resources.append(resource.get());
115 ResourceClient* resourceClient = new ResourceClient(this); 115 ResourceClient* resourceClient = new ResourceClient(this);
116 m_pendingResourceClients.add(resourceClient); 116 m_pendingResourceClients.add(resourceClient);
117 resourceClient->waitForResource(resource.get()); 117 resourceClient->waitForResource(resource.get());
118 } 118 }
119 } 119 }
120 120
121 Vector<CSSStyleSheet*> styleSheets; 121 WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> > styleSheets;
122 InspectorCSSAgent::collectAllDocumentStyleSheets(document, styleSheets); 122 InspectorCSSAgent::collectAllDocumentStyleSheets(document, styleSheets);
123 for (Vector<CSSStyleSheet*>::const_iterator stylesheetIt = styleSheets.b egin(); stylesheetIt != styleSheets.end(); ++stylesheetIt) { 123 for (WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet> >::const_iterato r stylesheetIt = styleSheets.begin(); stylesheetIt != styleSheets.end(); ++style sheetIt) {
124 CSSStyleSheet* styleSheet = *stylesheetIt; 124 CSSStyleSheet* styleSheet = *stylesheetIt;
125 if (styleSheet->isInline() || !styleSheet->contents()->loadCompleted ()) 125 if (styleSheet->isInline() || !styleSheet->contents()->loadCompleted ())
126 continue; 126 continue;
127 String url = styleSheet->baseURL().string(); 127 String url = styleSheet->baseURL().string();
128 if (url.isEmpty() || urlsToFetch.contains(url)) 128 if (url.isEmpty() || urlsToFetch.contains(url))
129 continue; 129 continue;
130 urlsToFetch.add(url); 130 urlsToFetch.add(url);
131 FetchRequest request(ResourceRequest(url), FetchInitiatorTypeNames:: internal); 131 FetchRequest request(ResourceRequest(url), FetchInitiatorTypeNames:: internal);
132 request.mutableResourceRequest().setRequestContext(blink::WebURLRequ est::RequestContextInternal); 132 request.mutableResourceRequest().setRequestContext(blink::WebURLRequ est::RequestContextInternal);
133 ResourcePtr<Resource> resource = document->fetcher()->fetchCSSStyleS heet(request); 133 ResourcePtr<Resource> resource = document->fetcher()->fetchCSSStyleS heet(request);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 (*it)->handleEvent(); 184 (*it)->handleEvent();
185 } 185 }
186 186
187 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) 187 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client)
188 { 188 {
189 m_pendingResourceClients.remove(client); 189 m_pendingResourceClients.remove(client);
190 checkDone(); 190 checkDone();
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/core/inspector/InspectorRuntimeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698