OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 void waitForResource(Resource* resource) | 33 void waitForResource(Resource* resource) |
34 { | 34 { |
35 if (resource->type() == Resource::Raw) | 35 if (resource->type() == Resource::Raw) |
36 resource->addClient(static_cast<RawResourceClient*>(this)); | 36 resource->addClient(static_cast<RawResourceClient*>(this)); |
37 else | 37 else |
38 resource->addClient(static_cast<StyleSheetResourceClient*>(this)); | 38 resource->addClient(static_cast<StyleSheetResourceClient*>(this)); |
39 } | 39 } |
40 | 40 |
| 41 virtual void trace(Visitor* visitor) OVERRIDE |
| 42 { |
| 43 RawResourceClient::trace(visitor); |
| 44 StyleSheetResourceClient::trace(visitor); |
| 45 } |
| 46 |
41 private: | 47 private: |
42 InspectorResourceContentLoader* m_loader; | 48 InspectorResourceContentLoader* m_loader; |
43 | 49 |
44 virtual void setCSSStyleSheet(const String&, const KURL&, const String&, con
st CSSStyleSheetResource*) OVERRIDE; | 50 virtual void setCSSStyleSheet(const String&, const KURL&, const String&, con
st CSSStyleSheetResource*) OVERRIDE; |
45 virtual void notifyFinished(Resource*) OVERRIDE; | 51 virtual void notifyFinished(Resource*) OVERRIDE; |
46 void resourceFinished(Resource*); | 52 void resourceFinished(Resource*); |
47 | 53 |
48 friend class InspectorResourceContentLoader; | 54 friend class InspectorResourceContentLoader; |
49 }; | 55 }; |
50 | 56 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 (*it)->handleEvent(); | 190 (*it)->handleEvent(); |
185 } | 191 } |
186 | 192 |
187 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) | 193 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) |
188 { | 194 { |
189 m_pendingResourceClients.remove(client); | 195 m_pendingResourceClients.remove(client); |
190 checkDone(); | 196 checkDone(); |
191 } | 197 } |
192 | 198 |
193 } // namespace blink | 199 } // namespace blink |
OLD | NEW |