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 24 matching lines...) Expand all Loading... |
35 { | 35 { |
36 if (resource->type() == Resource::Raw) | 36 if (resource->type() == 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 private: | 42 private: |
43 InspectorResourceContentLoader* m_loader; | 43 InspectorResourceContentLoader* m_loader; |
44 | 44 |
45 virtual void setCSSStyleSheet(const String&, const KURL&, const String&, con
st CSSStyleSheetResource*) override; | 45 void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSSt
yleSheetResource*) override; |
46 virtual void notifyFinished(Resource*) override; | 46 void notifyFinished(Resource*) override; |
47 void resourceFinished(Resource*); | 47 void resourceFinished(Resource*); |
48 | 48 |
49 friend class InspectorResourceContentLoader; | 49 friend class InspectorResourceContentLoader; |
50 }; | 50 }; |
51 | 51 |
52 void InspectorResourceContentLoader::ResourceClient::resourceFinished(Resource*
resource) | 52 void InspectorResourceContentLoader::ResourceClient::resourceFinished(Resource*
resource) |
53 { | 53 { |
54 if (m_loader) | 54 if (m_loader) |
55 m_loader->resourceFinished(this); | 55 m_loader->resourceFinished(this); |
56 | 56 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 callback->handleEvent(); | 198 callback->handleEvent(); |
199 } | 199 } |
200 | 200 |
201 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) | 201 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) |
202 { | 202 { |
203 m_pendingResourceClients.remove(client); | 203 m_pendingResourceClients.remove(client); |
204 checkDone(); | 204 checkDone(); |
205 } | 205 } |
206 | 206 |
207 } // namespace blink | 207 } // namespace blink |
OLD | NEW |