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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorResourceContainer.h

Issue 1888673002: [DevTools] Move style sheet content storage from css agent to resource loader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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: third_party/WebKit/Source/core/inspector/InspectorResourceContainer.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceContainer.h b/third_party/WebKit/Source/core/inspector/InspectorResourceContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..75330993ca0d8aab280ff37bb42b1bedb15177d9
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceContainer.h
@@ -0,0 +1,45 @@
+// Copyright 2016 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 InspectorResourceContainer_h
+#define InspectorResourceContainer_h
+
+#include "core/CoreExport.h"
+#include "platform/heap/Handle.h"
+#include "wtf/Forward.h"
+#include "wtf/HashMap.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/text/StringHash.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class InspectedFrames;
+class LocalFrame;
+
+class CORE_EXPORT InspectorResourceContainer : public GarbageCollectedFinalized<InspectorResourceContainer> {
+ WTF_MAKE_NONCOPYABLE(InspectorResourceContainer);
+public:
+ explicit InspectorResourceContainer(InspectedFrames*);
+ ~InspectorResourceContainer();
+ DECLARE_TRACE();
+
+ void didCommitLoadForLocalFrame(LocalFrame*);
+
+ void storeStyleSheetContent(const String& url, const String& content);
+ bool loadStyleSheetContent(const String& url, String* content);
+
+ void storeStyleElementContent(int backendNodeId, const String& content);
+ bool loadStyleElementContent(int backendNodeId, String* content);
+
+private:
+ Member<InspectedFrames> m_inspectedFrames;
+ HashMap<String, String> m_styleSheetContents;
+ HashMap<int, String> m_styleElementContents;
+};
+
+} // namespace blink
+
+
+#endif // !defined(InspectorResourceContainer_h)

Powered by Google App Engine
This is Rietveld 408576698