Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Side by Side Diff: Source/core/inspector/InspectorResourceContentLoader.h

Issue 347543002: DevTools: Extract CSS resources preloading from css agent to page agent controlled loader. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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/ResourcePtr.h"
9 #include "wtf/HashSet.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/Vector.h"
12
13 namespace WebCore {
14
15 class CSSStyleSheetResource;
16 class Page;
17 class Resource;
18 class VoidCallback;
19
20 class InspectorResourceContentLoader FINAL {
21 WTF_MAKE_NONCOPYABLE(InspectorResourceContentLoader);
22 WTF_MAKE_FAST_ALLOCATED;
23 public:
24 InspectorResourceContentLoader(Page*);
25 void addListener(PassOwnPtr<VoidCallback>);
26 ~InspectorResourceContentLoader();
27 bool hasFinished();
28 void stop();
29
30 private:
31 class ResourceClient;
32
33 void resourceFinished(ResourceClient*);
34 void checkDone();
35
36 Vector<OwnPtr<VoidCallback> > m_callbacks;
37 bool m_allRequestsStarted;
38 HashSet<ResourceClient*> m_pendingResourceClients;
39 Vector<ResourcePtr<Resource> > m_resources;
40
41 friend class ResourceClient;
42 };
43
44 } // namespace WebCore
45
46
47 #endif // !defined(InspectorResourceContentLoader_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/inspector/InspectorResourceContentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698