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

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: Remove isTracedByRenderer from blame_context_test.html 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 49%
rename from tracing/tracing/extras/chrome/render_frame.html
rename to tracing/tracing/extras/chrome/blame_context/render_frame.html
index 8703e55d74147d3568e1c844698a9ee254b7d0b3..3bd29e907fe734b770dc7275f8fb286e50aff8a2 100644
--- a/tracing/tracing/extras/chrome/render_frame.html
+++ b/tracing/tracing/extras/chrome/blame_context/render_frame.html
@@ -5,56 +5,69 @@ 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/blame_context.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 BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot;
+ var BlameContextInstance = tr.e.chrome.BlameContextInstance;
function RenderFrameSnapshot() {
- ObjectSnapshot.apply(this, arguments);
+ BlameContextSnapshot.apply(this, arguments);
}
RenderFrameSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- },
-
- initialize: function() {
- },
+ __proto__: BlameContextSnapshot.prototype,
referencedAt: function(item, object, field) {
if (item instanceof tr.e.chrome.FrameTreeNodeSnapshot &&
object === item.args &&
- field === 'RenderFrame') {
+ field === 'renderFrame') {
this.args.frameTreeNode = item;
}
},
+ get frameTreeNode() {
+ if (this.args.frameTreeNode instanceof tr.e.chrome.FrameTreeNodeSnapshot)
+ return this.args.frameTreeNode;
+ return undefined;
+ },
+
+ get url() {
+ if (this.frameTreeNode)
+ return this.frameTreeNode.url;
+ return undefined;
+ },
+
get userFriendlyName() {
return 'RenderFrame';
}
};
- ObjectSnapshot.register(
+ tr.model.ObjectSnapshot.register(
RenderFrameSnapshot,
{typeName: 'RenderFrame'});
function RenderFrameInstance() {
- ObjectInstance.apply(this, arguments);
+ BlameContextInstance.apply(this, arguments);
}
RenderFrameInstance.prototype = {
- __proto__: ObjectInstance.prototype
+ __proto__: BlameContextInstance.prototype,
+
+ get blameContextType() {
+ return 'Frame';
+ }
};
- ObjectInstance.register(
+ tr.model.ObjectInstance.register(
RenderFrameInstance,
{typeName: 'RenderFrame'});

Powered by Google App Engine
This is Rietveld 408576698