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

Unified Diff: Source/core/inspector/InspectorResourceContentLoader.h

Issue 267393003: DevTools: Load document (html) content from disk cache in page agent enabling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
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..c5524650d3487117e8b554abe5346ccaea9cdd33
--- /dev/null
+++ b/Source/core/inspector/InspectorResourceContentLoader.h
@@ -0,0 +1,45 @@
+// 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/RawResource.h"
+#include "core/fetch/StyleSheetResourceClient.h"
+#include "wtf/HashMap.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/Vector.h"
+
+namespace WebCore {
+
+class Page;
+class RawResourceClient;
+class StyleSheetResourceClient;
+class VoidCallback;
+
+class InspectorResourceContentLoader FINAL : private RawResourceClient, private StyleSheetResourceClient {
+ WTF_MAKE_NONCOPYABLE(InspectorResourceContentLoader);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ InspectorResourceContentLoader(Page*, PassOwnPtr<VoidCallback>);
+ virtual ~InspectorResourceContentLoader();
+ bool hasFinished();
+
+private:
+ virtual void notifyFinished(Resource*) OVERRIDE;
+ virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* charset */, const CSSStyleSheetResource*);
+ void resourceFinished(Resource*);
+ void worked();
+ void removeAsClientFromResource(Resource*);
+
+ OwnPtr<VoidCallback> m_callback;
+ int m_pendingResourcesCount;
pfeldman 2014/05/20 19:50:49 m_pendingResourceCount
+ HashSet<Resource*> m_pendingResources;
+ Vector<ResourcePtr<Resource> > m_resources;
+};
+
+} // namespace WebCore
+
+
+#endif // !defined(InspectorResourceContentLoader_h)

Powered by Google App Engine
This is Rietveld 408576698