| 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 "core/inspector/InspectorResourceContentLoader.h" | 5 #include "core/inspector/InspectorResourceContentLoader.h" |
| 6 | 6 |
| 7 #include "core/css/CSSStyleSheet.h" | 7 #include "core/css/CSSStyleSheet.h" |
| 8 #include "core/css/StyleSheetContents.h" | 8 #include "core/css/StyleSheetContents.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/fetch/CSSStyleSheetResource.h" | 10 #include "core/fetch/CSSStyleSheetResource.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 if (resource->getType() == Resource::Raw) | 36 if (resource->getType() == Resource::Raw) |
| 37 resource->addClient(static_cast<RawResourceClient*>(this)); | 37 resource->addClient(static_cast<RawResourceClient*>(this)); |
| 38 else | 38 else |
| 39 resource->addClient(static_cast<StyleSheetResourceClient*>(this)); | 39 resource->addClient(static_cast<StyleSheetResourceClient*>(this)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 DEFINE_INLINE_TRACE() | 42 DEFINE_INLINE_TRACE() |
| 43 { | 43 { |
| 44 visitor->trace(m_loader); | 44 visitor->trace(m_loader); |
| 45 StyleSheetResourceClient::trace(visitor); | 45 StyleSheetResourceClient::trace(visitor); |
| 46 RawResourceClient::trace(visitor); |
| 46 } | 47 } |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 Member<InspectorResourceContentLoader> m_loader; | 50 Member<InspectorResourceContentLoader> m_loader; |
| 50 | 51 |
| 51 void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSSt
yleSheetResource*) override; | 52 void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSSt
yleSheetResource*) override; |
| 52 void notifyFinished(Resource*) override; | 53 void notifyFinished(Resource*) override; |
| 53 String debugName() const override { return "InspectorResourceContentLoader::
ResourceClient"; } | 54 String debugName() const override { return "InspectorResourceContentLoader::
ResourceClient"; } |
| 54 void resourceFinished(Resource*); | 55 void resourceFinished(Resource*); |
| 55 | 56 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 220 } |
| 220 } | 221 } |
| 221 | 222 |
| 222 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) | 223 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) |
| 223 { | 224 { |
| 224 m_pendingResourceClients.remove(client); | 225 m_pendingResourceClients.remove(client); |
| 225 checkDone(); | 226 checkDone(); |
| 226 } | 227 } |
| 227 | 228 |
| 228 } // namespace blink | 229 } // namespace blink |
| OLD | NEW |