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

Unified Diff: headless/public/util/flat_dom_tree_extractor.h

Issue 2882193002: [devtools] Add DOMSnapshot domain for dom+layout+style snapshots. (Closed)
Patch Set: move to CSS domain, remove getLayoutTreeAndStyles 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: headless/public/util/flat_dom_tree_extractor.h
diff --git a/headless/public/util/flat_dom_tree_extractor.h b/headless/public/util/flat_dom_tree_extractor.h
index 867c4594c75f646d175714bdcb7f2830394bbe3e..fdcc755f413362d5e4382ab10c3538ddcfcfdc0d 100644
--- a/headless/public/util/flat_dom_tree_extractor.h
+++ b/headless/public/util/flat_dom_tree_extractor.h
@@ -47,12 +47,8 @@ class HEADLESS_EXPORT FlatDomTreeExtractor {
private:
friend class FlatDomTreeExtractor;
- // Owns the raw pointers in |dom_nodes_|.
- std::unique_ptr<dom::GetFlattenedDocumentResult> document_result_;
-
- // Owns the raw pointers in |layout_tree_nodes_|.
- std::unique_ptr<css::GetLayoutTreeAndStylesResult>
- layout_tree_and_styles_result_;
+ // Owns the raw pointers in |dom_nodes_| and |layout_tree_nodes_|.
+ std::unique_ptr<css::GetDocumentSnapshotResult> document_snapshot_result_;
DISALLOW_COPY_AND_ASSIGN(DomTree);
};
@@ -65,13 +61,9 @@ class HEADLESS_EXPORT FlatDomTreeExtractor {
DomResultCB callback);
private:
- void OnDocumentFetched(
- std::unique_ptr<dom::GetFlattenedDocumentResult> result);
-
- void OnLayoutTreeAndStylesFetched(
- std::unique_ptr<css::GetLayoutTreeAndStylesResult> result);
+ void OnDocumentSnapshotResult(
+ std::unique_ptr<css::GetDocumentSnapshotResult> result);
- void MaybeExtractDomTree();
void EnumerateNodes(const dom::Node* node);
void ExtractLayoutTreeNodes();
void ExtractComputedStyles();

Powered by Google App Engine
This is Rietveld 408576698