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

Unified Diff: content/browser/frame_host/traced_frame_tree.h

Issue 1390053002: Trace FrameTreeNode Snapshots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TraceSnapshot only in FrameTree Created 5 years, 2 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: content/browser/frame_host/traced_frame_tree.h
diff --git a/content/browser/frame_host/traced_frame_tree.h b/content/browser/frame_host/traced_frame_tree.h
new file mode 100644
index 0000000000000000000000000000000000000000..f674c2df4d754a5b9f96602b114f229024b7ddb5
--- /dev/null
+++ b/content/browser/frame_host/traced_frame_tree.h
@@ -0,0 +1,36 @@
+// Copyright 2015 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.
+
+#include "base/macros.h"
+#include "base/memory/scoped_vector.h"
+#include "base/trace_event/trace_event_impl.h"
+#include "base/values.h"
+#include "content/common/content_export.h"
+#include "url/gurl.h"
+
+namespace content {
+
+class FrameTree;
+class FrameTreeNode;
+
+// This is a temporary container used when tracing snapshots of FrameTree
+// objects. When a snapshot of a FrameTree is taken, a TracedFrameTree is
+// created and stored by the tracing system until the trace is dumped.
+class CONTENT_EXPORT TracedFrameTree :
+ public base::trace_event::ConvertableToTraceFormat {
+ public:
+ static scoped_refptr<TracedFrameTree> Create(const FrameTree& tree);
+
+ void AppendAsTraceFormat(std::string* out) const override;
+
+ private:
+ explicit TracedFrameTree(scoped_ptr<base::DictionaryValue> value);
+ ~TracedFrameTree() override;
+
+ scoped_ptr<base::DictionaryValue> value_;
+
+ DISALLOW_COPY_AND_ASSIGN(TracedFrameTree);
+};
+
+} // content

Powered by Google App Engine
This is Rietveld 408576698