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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 : m_allRequestsStarted(false) | 86 : m_allRequestsStarted(false) |
87 , m_started(false) | 87 , m_started(false) |
88 , m_inspectedFrame(inspectedFrame) | 88 , m_inspectedFrame(inspectedFrame) |
89 { | 89 { |
90 } | 90 } |
91 | 91 |
92 void InspectorResourceContentLoader::start() | 92 void InspectorResourceContentLoader::start() |
93 { | 93 { |
94 m_started = true; | 94 m_started = true; |
95 WillBeHeapVector<RawPtrWillBeMember<Document>> documents; | 95 WillBeHeapVector<RawPtrWillBeMember<Document>> documents; |
96 for (LocalFrame* frame : InspectedFrames(m_inspectedFrame)) { | 96 OwnPtrWillBeRawPtr<InspectedFrames> inspectedFrames = InspectedFrames::creat
e(m_inspectedFrame); |
| 97 for (LocalFrame* frame : *inspectedFrames) { |
97 documents.append(frame->document()); | 98 documents.append(frame->document()); |
98 documents.appendVector(InspectorPageAgent::importsForFrame(frame)); | 99 documents.appendVector(InspectorPageAgent::importsForFrame(frame)); |
99 } | 100 } |
100 for (Document* document : documents) { | 101 for (Document* document : documents) { |
101 HashSet<String> urlsToFetch; | 102 HashSet<String> urlsToFetch; |
102 | 103 |
103 ResourceRequest resourceRequest; | 104 ResourceRequest resourceRequest; |
104 HistoryItem* item = document->frame() ? document->frame()->loader().curr
entItem() : nullptr; | 105 HistoryItem* item = document->frame() ? document->frame()->loader().curr
entItem() : nullptr; |
105 if (item) { | 106 if (item) { |
106 resourceRequest = | 107 resourceRequest = |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 (*callback)(); | 211 (*callback)(); |
211 } | 212 } |
212 | 213 |
213 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) | 214 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) |
214 { | 215 { |
215 m_pendingResourceClients.remove(client); | 216 m_pendingResourceClients.remove(client); |
216 checkDone(); | 217 checkDone(); |
217 } | 218 } |
218 | 219 |
219 } // namespace blink | 220 } // namespace blink |
OLD | NEW |