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

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

Issue 1901023003: Introduce browser side FrameTreeNodeBlameContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_node_blame_context.h
diff --git a/content/browser/frame_host/frame_tree_node_blame_context.h b/content/browser/frame_host/frame_tree_node_blame_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..c12f9d2c2b14671d52727213d6548e0850c91339
--- /dev/null
+++ b/content/browser/frame_host/frame_tree_node_blame_context.h
@@ -0,0 +1,44 @@
+// Copyright 2016 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 CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_BLAME_CONTEXT_H
+#define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_BLAME_CONTEXT_H
+
+#include "base/macros.h"
+#include "base/trace_event/blame_context.h"
+
+namespace base {
+namespace trace_event {
+class TracedValue;
+}
+}
+
+namespace content {
+
+class FrameTreeNode;
+
+class FrameTreeNodeBlameContext : public base::trace_event::BlameContext {
+ public:
+ FrameTreeNodeBlameContext(FrameTreeNode* node);
+ ~FrameTreeNodeBlameContext() override;
+
+ // Before taking a snapshot, call this function to make sure all arguments
+ // are up-to-date.
+ // TODO(xiaochengh): Get rid of this function by somehow storing the node.
+ void UpdateArguments(FrameTreeNode* node);
+ void ClearArguments();
+
+ private:
+ void AsValueInto(base::trace_event::TracedValue* value) override;
+
+ int process_id_;
+ int routing_id_;
+ std::string url_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameTreeNodeBlameContext);
+};
+
+} // content
+
+#endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_BLAME_CONTEXT_H

Powered by Google App Engine
This is Rietveld 408576698