Chromium Code Reviews| Index: tracing/tracing/extras/chrome/blame_context/frame_tree_node.html |
| diff --git a/tracing/tracing/extras/chrome/frame_tree_node.html b/tracing/tracing/extras/chrome/blame_context/frame_tree_node.html |
| similarity index 45% |
| rename from tracing/tracing/extras/chrome/frame_tree_node.html |
| rename to tracing/tracing/extras/chrome/blame_context/frame_tree_node.html |
| index dde8fc28d1f8bc6a061fa07169cf7f27660fe872..6ba658ae52e44cb2dc04f05ca20a9cbfdd480114 100644 |
| --- a/tracing/tracing/extras/chrome/frame_tree_node.html |
| +++ b/tracing/tracing/extras/chrome/blame_context/frame_tree_node.html |
| @@ -5,28 +5,34 @@ 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::FrameTreeNode 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 FrameTreeNodeSnapshot() { |
| - ObjectSnapshot.apply(this, arguments); |
| + FrameBlameContextBaseSnapshot.apply(this, arguments); |
| } |
| FrameTreeNodeSnapshot.prototype = { |
| - __proto__: ObjectSnapshot.prototype, |
| + __proto__: FrameBlameContextBaseSnapshot.prototype, |
| - preInitialize: function() { |
| + get crossProcessCounterpart() { |
| + if (this.args.RenderFrame instanceof tr.e.chrome.RenderFrameSnapshot) |
| + return this.args.RenderFrame; |
|
Sami
2016/05/27 14:03:09
s/.RenderFrame/.renderFrame/?
Xiaocheng
2016/05/30 07:55:55
Nope. The field name "RenderFrame" is set in Chrom
Sami
2016/05/31 16:59:36
Oh really? Could you point me to where it's coming
benjhayden
2016/05/31 17:37:12
https://code.google.com/p/chromium/codesearch#chro
Sami
2016/05/31 18:15:10
Ah I see, thanks. Yeah, that should probably be ca
benjhayden
2016/05/31 19:49:59
If you meant "render_frame", then I agree.
Xiaocheng
2016/06/01 01:22:11
The naming is kind of inconsistent. I'll fix it in
|
| }, |
| - initialize: function() { |
| + get url() { |
| + return this.args.url; |
| }, |
| get userFriendlyName() { |
| @@ -34,19 +40,23 @@ tr.exportTo('tr.e.chrome', function() { |
| } |
| }; |
| - ObjectSnapshot.register( |
| + tr.model.ObjectSnapshot.register( |
| FrameTreeNodeSnapshot, |
| {typeName: 'FrameTreeNode'}); |
| function FrameTreeNodeInstance() { |
| - ObjectInstance.apply(this, arguments); |
| + FrameBlameContextBaseInstance.apply(this, arguments); |
| } |
| FrameTreeNodeInstance.prototype = { |
| - __proto__: ObjectInstance.prototype |
| + __proto__: FrameBlameContextBaseInstance.prototype, |
| + |
| + get isTracedByRenderer() { |
| + return false; |
| + } |
| }; |
| - ObjectInstance.register( |
| + tr.model.ObjectInstance.register( |
| FrameTreeNodeInstance, |
| {typeName: 'FrameTreeNode'}); |