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

Unified Diff: tracing/tracing/extras/chrome/blame_context/render_frame.html

Issue 2016213002: Introduce base classes for blame contexts (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Add frame_blame_context_test.html; And some other revision Created 4 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: tracing/tracing/extras/chrome/blame_context/render_frame.html
diff --git a/tracing/tracing/extras/chrome/render_frame.html b/tracing/tracing/extras/chrome/blame_context/render_frame.html
similarity index 46%
rename from tracing/tracing/extras/chrome/render_frame.html
rename to tracing/tracing/extras/chrome/blame_context/render_frame.html
index 8703e55d74147d3568e1c844698a9ee254b7d0b3..d5e4eaea9826314f4c84706fe0ba69f265f2658a 100644
--- a/tracing/tracing/extras/chrome/render_frame.html
+++ b/tracing/tracing/extras/chrome/blame_context/render_frame.html
@@ -5,31 +5,30 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<link rel="import" href="/tracing/model/object_instance.html">
+<link rel="import" href="/tracing/extras/chrome/blame_context/frame_blame_context_base.html">
<script>
'use strict';
+/**
+ * @fileoverview Trace viewer side's correspondence of Chrome's
+ * content::FrameBlameContext class.
+ *
+ */
tr.exportTo('tr.e.chrome', function() {
- var constants = tr.e.cc.constants;
-
- var ObjectSnapshot = tr.model.ObjectSnapshot;
- var ObjectInstance = tr.model.ObjectInstance;
+ var FrameBlameContextBaseSnapshot = tr.e.chrome.FrameBlameContextBaseSnapshot;
+ var FrameBlameContextBaseInstance = tr.e.chrome.FrameBlameContextBaseInstance;
function RenderFrameSnapshot() {
- ObjectSnapshot.apply(this, arguments);
+ FrameBlameContextBaseSnapshot.apply(this, arguments);
}
RenderFrameSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- },
-
- initialize: function() {
- },
+ __proto__: FrameBlameContextBaseSnapshot.prototype,
referencedAt: function(item, object, field) {
+ FrameBlameContextBaseSnapshot.prototype.referencedAt.apply(this,
+ arguments);
if (item instanceof tr.e.chrome.FrameTreeNodeSnapshot &&
object === item.args &&
field === 'RenderFrame') {
@@ -37,24 +36,38 @@ tr.exportTo('tr.e.chrome', function() {
}
},
+ get crossProcessCounterpart() {
+ if (this.args.frameTreeNode instanceof tr.e.chrome.FrameTreeNodeSnapshot)
+ return this.args.frameTreeNode;
+ },
+
+ get url() {
+ if (this.crossProcessCounterpart)
+ return this.crossProcessCounterpart.url;
+ },
+
get userFriendlyName() {
return 'RenderFrame';
}
};
- ObjectSnapshot.register(
+ tr.model.ObjectSnapshot.register(
RenderFrameSnapshot,
{typeName: 'RenderFrame'});
function RenderFrameInstance() {
- ObjectInstance.apply(this, arguments);
+ FrameBlameContextBaseInstance.apply(this, arguments);
}
RenderFrameInstance.prototype = {
- __proto__: ObjectInstance.prototype
+ __proto__: FrameBlameContextBaseInstance.prototype,
+
+ get isTracedByRenderer() {
+ return true;
+ }
};
- ObjectInstance.register(
+ tr.model.ObjectInstance.register(
RenderFrameInstance,
{typeName: 'RenderFrame'});

Powered by Google App Engine
This is Rietveld 408576698