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 46% |
| rename from tracing/tracing/extras/chrome/frame_tree_node.html |
| rename to tracing/tracing/extras/chrome/blame_context/frame_tree_node.html |
| index dde8fc28d1f8bc6a061fa07169cf7f27660fe872..eee0dc13df87bab41c32c909183d6138b8bf3f93 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/blame_context.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 BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot; |
| + var BlameContextInstance = tr.e.chrome.BlameContextInstance; |
| function FrameTreeNodeSnapshot() { |
| - ObjectSnapshot.apply(this, arguments); |
| + BlameContextSnapshot.apply(this, arguments); |
| } |
| FrameTreeNodeSnapshot.prototype = { |
| - __proto__: ObjectSnapshot.prototype, |
| + __proto__: BlameContextSnapshot.prototype, |
| - preInitialize: function() { |
| + get crossProcessCounterpart() { |
|
Sami
2016/06/01 16:02:11
My preference would be to call these renderer/brow
benjhayden
2016/06/01 20:23:22
These getters should specify their type: renderFra
Xiaocheng
2016/06/02 06:54:55
FrameTreeNodeSnapshot and RenderFrameSnapshot shou
benjhayden
2016/06/02 20:07:01
Right, I think I see what you're doing. You're sav
Xiaocheng
2016/06/03 05:38:38
Yeah, you do have a point.
Done.
|
| + if (this.args.renderFrame instanceof tr.e.chrome.RenderFrameSnapshot) |
| + return this.args.renderFrame; |
| }, |
| - initialize: function() { |
| + get url() { |
| + return this.args.url; |
| }, |
| get userFriendlyName() { |
| @@ -34,19 +40,27 @@ tr.exportTo('tr.e.chrome', function() { |
| } |
| }; |
| - ObjectSnapshot.register( |
| + tr.model.ObjectSnapshot.register( |
| FrameTreeNodeSnapshot, |
| {typeName: 'FrameTreeNode'}); |
| function FrameTreeNodeInstance() { |
| - ObjectInstance.apply(this, arguments); |
| + BlameContextInstance.apply(this, arguments); |
| } |
| FrameTreeNodeInstance.prototype = { |
| - __proto__: ObjectInstance.prototype |
| + __proto__: BlameContextInstance.prototype, |
| + |
| + get isTracedByRenderer() { |
|
benjhayden
2016/06/01 20:23:22
Why is this necessary?
Snapshots have a 'snapshott
Xiaocheng
2016/06/02 06:54:55
They do, but the thread/process itself doesn't tel
benjhayden
2016/06/02 20:07:01
Sure it does: Process.name = 'Browser'/'Renderer',
Xiaocheng
2016/06/03 05:38:38
TIL model/helpers/.
Done.
|
| + return false; |
| + }, |
| + |
| + get blameContextType() { |
| + return 'Frame'; |
| + } |
| }; |
| - ObjectInstance.register( |
| + tr.model.ObjectInstance.register( |
| FrameTreeNodeInstance, |
| {typeName: 'FrameTreeNode'}); |