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

Unified Diff: content/browser/frame_host/frame_tree.cc

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/frame_tree.cc
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index ac61afa5240b7d354ad2e4f6b558483f6fb19930..a617d274a69d5e518e95838f27b47ed7e3ebfa39 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -16,6 +16,7 @@
#include "content/browser/frame_host/render_frame_host_factory.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/frame_host/render_frame_proxy_host.h"
+#include "content/browser/frame_host/traced_frame_tree.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/common/input_messages.h"
@@ -216,6 +217,7 @@ RenderFrameHostImpl* FrameTree::AddFrame(FrameTreeNode* parent,
FrameTreeNode* node_ptr = node.get();
// AddChild is what creates the RenderFrameHost.
parent->AddChild(node.Pass(), process_id, new_routing_id);
+ TraceSnapshot();
return node_ptr->current_frame_host();
}
@@ -227,6 +229,7 @@ void FrameTree::RemoveFrame(FrameTreeNode* child) {
}
parent->RemoveChild(child);
+ TraceSnapshot();
}
void FrameTree::CreateProxiesForSiteInstance(
@@ -439,4 +442,10 @@ void FrameTree::ReplicatePageFocus(bool is_focused) {
}
}
+void FrameTree::TraceSnapshot() const {
+ TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("navigation", "FrameTree", this,
+ scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
+ TracedFrameTree::Create(*this)));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698