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

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

Issue 527183002: Oilpan: Prepare moving InspectorResourceContentLoader to Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/inspector/InspectorResourceContentLoader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void InspectorResourceContentLoader::ensureResourcesContentLoaded(PassOwnPtrWill BeRawPtr<VoidCallback> callback) 148 void InspectorResourceContentLoader::ensureResourcesContentLoaded(PassOwnPtrWill BeRawPtr<VoidCallback> callback)
149 { 149 {
150 if (!m_started) 150 if (!m_started)
151 start(); 151 start();
152 m_callbacks.append(callback); 152 m_callbacks.append(callback);
153 checkDone(); 153 checkDone();
154 } 154 }
155 155
156 InspectorResourceContentLoader::~InspectorResourceContentLoader() 156 InspectorResourceContentLoader::~InspectorResourceContentLoader()
157 { 157 {
158 ASSERT(m_resources.isEmpty());
159 }
160
161 void InspectorResourceContentLoader::trace(Visitor* visitor)
162 {
163 visitor->trace(m_callbacks);
164 visitor->trace(m_page);
165 }
166
167 void InspectorResourceContentLoader::dispose()
168 {
158 stop(); 169 stop();
159 } 170 }
160 171
161 void InspectorResourceContentLoader::stop() 172 void InspectorResourceContentLoader::stop()
162 { 173 {
163 HashSet<ResourceClient*> pendingResourceClients; 174 HashSet<ResourceClient*> pendingResourceClients;
164 m_pendingResourceClients.swap(pendingResourceClients); 175 m_pendingResourceClients.swap(pendingResourceClients);
165 for (HashSet<ResourceClient*>::const_iterator it = pendingResourceClients.be gin(); it != pendingResourceClients.end(); ++it) 176 for (HashSet<ResourceClient*>::const_iterator it = pendingResourceClients.be gin(); it != pendingResourceClients.end(); ++it)
166 (*it)->m_loader = 0; 177 (*it)->m_loader = 0;
167 m_resources.clear(); 178 m_resources.clear();
(...skipping 16 matching lines...) Expand all
184 (*it)->handleEvent(); 195 (*it)->handleEvent();
185 } 196 }
186 197
187 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) 198 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client)
188 { 199 {
189 m_pendingResourceClients.remove(client); 200 m_pendingResourceClients.remove(client);
190 checkDone(); 201 checkDone();
191 } 202 }
192 203
193 } // namespace blink 204 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceContentLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698