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/css/CSSStyleSheet.h" | 8 #include "core/css/CSSStyleSheet.h" |
9 #include "core/css/StyleSheetContents.h" | 9 #include "core/css/StyleSheetContents.h" |
10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
(...skipping 26 matching lines...) Expand all Loading... |
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 private: | 42 private: |
43 InspectorResourceContentLoader* m_loader; | 43 InspectorResourceContentLoader* m_loader; |
44 | 44 |
45 void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSSt
yleSheetResource*) override; | 45 void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSSt
yleSheetResource*) override; |
46 void notifyFinished(Resource*) override; | 46 void notifyFinished(Resource*) override; |
| 47 String debugName() const override { return "InspectorResourceContentLoader::
ResourceClient"; } |
47 void resourceFinished(Resource*); | 48 void resourceFinished(Resource*); |
48 | 49 |
49 friend class InspectorResourceContentLoader; | 50 friend class InspectorResourceContentLoader; |
50 }; | 51 }; |
51 | 52 |
52 void InspectorResourceContentLoader::ResourceClient::resourceFinished(Resource*
resource) | 53 void InspectorResourceContentLoader::ResourceClient::resourceFinished(Resource*
resource) |
53 { | 54 { |
54 if (m_loader) | 55 if (m_loader) |
55 m_loader->resourceFinished(this); | 56 m_loader->resourceFinished(this); |
56 | 57 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 (*callback)(); | 200 (*callback)(); |
200 } | 201 } |
201 | 202 |
202 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) | 203 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) |
203 { | 204 { |
204 m_pendingResourceClients.remove(client); | 205 m_pendingResourceClients.remove(client); |
205 checkDone(); | 206 checkDone(); |
206 } | 207 } |
207 | 208 |
208 } // namespace blink | 209 } // namespace blink |
OLD | NEW |