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

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

Issue 2882193002: [devtools] Add DOMSnapshot domain for dom+layout+style snapshots. (Closed)
Patch Set: add domain to schema agent Created 3 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: third_party/WebKit/Source/core/inspector/InspectorDOMSnapshotAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMSnapshotAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDOMSnapshotAgent.h
new file mode 100644
index 0000000000000000000000000000000000000000..1b0103568eac2fcad8920b381c9c67c7842ff9e4
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMSnapshotAgent.h
@@ -0,0 +1,47 @@
+// Copyright 2017 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 InspectorDOMSnapshotAgent_h
+#define InspectorDOMSnapshotAgent_h
+
+#include "core/inspector/InspectorBaseAgent.h"
+#include "core/inspector/InspectorCSSAgent.h"
+#include "core/inspector/InspectorDOMAgent.h"
+#include "core/inspector/protocol/DOMSnapshot.h"
+
+namespace blink {
+
+class CORE_EXPORT InspectorDOMSnapshotAgent final
+ : public InspectorBaseAgent<protocol::DOMSnapshot::Metainfo> {
+ WTF_MAKE_NONCOPYABLE(InspectorDOMSnapshotAgent);
+
+ public:
+ static InspectorDOMSnapshotAgent* Create(InspectorCSSAgent* css_agent,
+ InspectorDOMAgent* dom_agent) {
+ return new InspectorDOMSnapshotAgent(css_agent, dom_agent);
+ }
+
+ ~InspectorDOMSnapshotAgent() override;
+ DECLARE_VIRTUAL_TRACE();
+
+ protocol::Response getSnapshot(
+ std::unique_ptr<protocol::Array<String>> style_whitelist,
+ protocol::Maybe<int> dom_depth,
+ protocol::Maybe<bool> pierce,
+ std::unique_ptr<protocol::Array<protocol::DOM::Node>>* dom_nodes,
+ std::unique_ptr<protocol::Array<protocol::CSS::LayoutTreeNode>>*
+ layout_tree_nodes,
+ std::unique_ptr<protocol::Array<protocol::CSS::ComputedStyle>>*
+ computed_styles) override;
+
+ private:
+ InspectorDOMSnapshotAgent(InspectorCSSAgent*, InspectorDOMAgent*);
+
+ Member<InspectorCSSAgent> css_agent_;
+ Member<InspectorDOMAgent> dom_agent_;
+};
+
+} // namespace blink
+
+#endif // !defined(InspectorDOMSnapshotAgent_h)

Powered by Google App Engine
This is Rietveld 408576698