| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef InspectorResourceContentLoader_h | |
| 6 #define InspectorResourceContentLoader_h | |
| 7 | |
| 8 #include "core/fetch/RawResource.h" | |
| 9 #include "core/fetch/StyleSheetResourceClient.h" | |
| 10 #include "wtf/HashMap.h" | |
| 11 #include "wtf/Noncopyable.h" | |
| 12 #include "wtf/Vector.h" | |
| 13 | |
| 14 namespace WebCore { | |
| 15 | |
| 16 class Page; | |
| 17 class RawResourceClient; | |
| 18 class StyleSheetResourceClient; | |
| 19 class VoidCallback; | |
| 20 | |
| 21 class InspectorResourceContentLoader FINAL : private RawResourceClient, private
StyleSheetResourceClient { | |
| 22 WTF_MAKE_NONCOPYABLE(InspectorResourceContentLoader); | |
| 23 WTF_MAKE_FAST_ALLOCATED; | |
| 24 public: | |
| 25 InspectorResourceContentLoader(Page*); | |
| 26 void addListener(PassOwnPtr<VoidCallback>); | |
| 27 virtual ~InspectorResourceContentLoader(); | |
| 28 bool hasFinished(); | |
| 29 void stop(); | |
| 30 | |
| 31 private: | |
| 32 virtual void notifyFinished(Resource*) OVERRIDE; | |
| 33 virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseU
RL */, const String& /* charset */, const CSSStyleSheetResource*); | |
| 34 void resourceFinished(Resource*); | |
| 35 void checkDone(); | |
| 36 void removeAsClientFromResource(Resource*); | |
| 37 | |
| 38 Vector<OwnPtr<VoidCallback> > m_callbacks; | |
| 39 bool m_allRequestsStarted; | |
| 40 HashSet<Resource*> m_pendingResources; | |
| 41 Vector<ResourcePtr<Resource> > m_resources; | |
| 42 }; | |
| 43 | |
| 44 } // namespace WebCore | |
| 45 | |
| 46 | |
| 47 #endif // !defined(InspectorResourceContentLoader_h) | |
| OLD | NEW |