OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2016 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2016 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html
"> | 8 <link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html
"> |
9 | 9 |
10 <script> | 10 <script> |
11 'use strict'; | 11 'use strict'; |
12 | 12 |
13 /** | 13 /** |
14 * @fileoverview Trace Viewer side's correspondence of Chrome's | 14 * @fileoverview Trace Viewer side's correspondence of Chrome's |
15 * content::FrameTreeNode class. | 15 * content::FrameTreeNode class. |
16 * | 16 * |
17 */ | 17 */ |
18 tr.exportTo('tr.e.chrome', function() { | 18 tr.exportTo('tr.e.chrome', function() { |
19 var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot; | 19 var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot; |
20 var BlameContextInstance = tr.e.chrome.BlameContextInstance; | 20 var BlameContextInstance = tr.e.chrome.BlameContextInstance; |
21 | 21 |
22 function FrameTreeNodeSnapshot() { | 22 function FrameTreeNodeSnapshot() { |
23 BlameContextSnapshot.apply(this, arguments); | 23 BlameContextSnapshot.apply(this, arguments); |
24 } | 24 } |
25 | 25 |
26 FrameTreeNodeSnapshot.prototype = { | 26 FrameTreeNodeSnapshot.prototype = { |
27 __proto__: BlameContextSnapshot.prototype, | 27 __proto__: BlameContextSnapshot.prototype, |
28 | 28 |
29 get renderFrame() { | 29 get renderFrame() { |
30 if (this.args.renderFrame instanceof tr.e.chrome.RenderFrameSnapshot) | 30 if (this.args.renderFrame instanceof tr.e.chrome.RenderFrameSnapshot) { |
31 return this.args.renderFrame; | 31 return this.args.renderFrame; |
| 32 } |
32 return undefined; | 33 return undefined; |
33 }, | 34 }, |
34 | 35 |
35 get url() { | 36 get url() { |
36 return this.args.url; | 37 return this.args.url; |
37 }, | 38 }, |
38 | 39 |
39 get userFriendlyName() { | 40 get userFriendlyName() { |
40 return 'FrameTreeNode'; | 41 return 'FrameTreeNode'; |
41 } | 42 } |
(...skipping 18 matching lines...) Expand all Loading... |
60 tr.model.ObjectInstance.subTypes.register( | 61 tr.model.ObjectInstance.subTypes.register( |
61 FrameTreeNodeInstance, | 62 FrameTreeNodeInstance, |
62 {typeName: 'FrameTreeNode'}); | 63 {typeName: 'FrameTreeNode'}); |
63 | 64 |
64 return { | 65 return { |
65 FrameTreeNodeSnapshot, | 66 FrameTreeNodeSnapshot, |
66 FrameTreeNodeInstance, | 67 FrameTreeNodeInstance, |
67 }; | 68 }; |
68 }); | 69 }); |
69 </script> | 70 </script> |
OLD | NEW |