Chromium Code Reviews| Index: Source/core/inspector/InspectorResourceContentLoader.h |
| diff --git a/Source/core/inspector/InspectorResourceContentLoader.h b/Source/core/inspector/InspectorResourceContentLoader.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..db98758b2a3166802fdb4197c1c15fac46013c49 |
| --- /dev/null |
| +++ b/Source/core/inspector/InspectorResourceContentLoader.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef InspectorResourceContentLoader_h |
| +#define InspectorResourceContentLoader_h |
| + |
| +#include "core/fetch/ResourcePtr.h" |
| +#include "wtf/HashSet.h" |
| +#include "wtf/Noncopyable.h" |
| +#include "wtf/Vector.h" |
| + |
| +namespace WebCore { |
| + |
| +class CSSStyleSheetResource; |
| +class Page; |
| +class Resource; |
| +class VoidCallback; |
| + |
| +class InspectorResourceContentLoader FINAL { |
| + WTF_MAKE_NONCOPYABLE(InspectorResourceContentLoader); |
| + WTF_MAKE_FAST_ALLOCATED; |
| +public: |
| + InspectorResourceContentLoader(Page*); |
| + void addListener(PassOwnPtr<VoidCallback>); |
| + virtual ~InspectorResourceContentLoader(); |
|
apavlov
2014/06/18 14:33:59
should not be virtual
vsevik
2014/06/18 14:49:56
Done.
|
| + bool hasFinished(); |
| + void stop(); |
| + |
| +private: |
| + class ResourceClient; |
| + |
| + void resourceFinished(ResourceClient*); |
| + void checkDone(); |
| + |
| + Vector<OwnPtr<VoidCallback> > m_callbacks; |
| + bool m_allRequestsStarted; |
| + HashSet<ResourceClient*> m_pendingResourceClients; |
| + Vector<ResourcePtr<Resource> > m_resources; |
| + |
| + friend class ResourceClient; |
| +}; |
| + |
| +} // namespace WebCore |
| + |
| + |
| +#endif // !defined(InspectorResourceContentLoader_h) |