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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 pierce.fromMaybe(false), 469 pierce.fromMaybe(false),
470 document_node_to_id_map_.Get()); 470 document_node_to_id_map_.Get());
471 return Response::OK(); 471 return Response::OK();
472 } 472 }
473 473
474 Response InspectorDOMAgent::getFlattenedDocument( 474 Response InspectorDOMAgent::getFlattenedDocument(
475 Maybe<int> depth, 475 Maybe<int> depth,
476 Maybe<bool> pierce, 476 Maybe<bool> pierce,
477 std::unique_ptr<protocol::Array<protocol::DOM::Node>>* nodes) { 477 std::unique_ptr<protocol::Array<protocol::DOM::Node>>* nodes) {
478 if (!Enabled()) 478 if (!Enabled())
479 return Response::Error("Document not enabled"); 479 return Response::Error("DOM agent hasn't been enabled");
480 480
481 if (!document_) 481 if (!document_)
482 return Response::Error("Document is not available"); 482 return Response::Error("Document is not available");
483 483
484 DiscardFrontendBindings(); 484 DiscardFrontendBindings();
485 485
486 int sanitized_depth = depth.fromMaybe(-1); 486 int sanitized_depth = depth.fromMaybe(-1);
487 if (sanitized_depth == -1) 487 if (sanitized_depth == -1)
488 sanitized_depth = INT_MAX; 488 sanitized_depth = INT_MAX;
489 489
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 visitor->Trace(id_to_nodes_map_); 2164 visitor->Trace(id_to_nodes_map_);
2165 visitor->Trace(document_); 2165 visitor->Trace(document_);
2166 visitor->Trace(revalidate_task_); 2166 visitor->Trace(revalidate_task_);
2167 visitor->Trace(search_results_); 2167 visitor->Trace(search_results_);
2168 visitor->Trace(history_); 2168 visitor->Trace(history_);
2169 visitor->Trace(dom_editor_); 2169 visitor->Trace(dom_editor_);
2170 InspectorBaseAgent::Trace(visitor); 2170 InspectorBaseAgent::Trace(visitor);
2171 } 2171 }
2172 2172
2173 } // namespace blink 2173 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698