OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 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/model/event_set.html"> | 8 <link rel="import" href="/tracing/model/event_set.html"> |
9 <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> | 9 <link rel="import" href="/tracing/ui/analysis/analysis_link.html"> |
10 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> | 10 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 this.textContent = ''; | 77 this.textContent = ''; |
78 this.currentSelection_ = selection; | 78 this.currentSelection_ = selection; |
79 | 79 |
80 var snapshot = selection[0]; | 80 var snapshot = selection[0]; |
81 | 81 |
82 var typeInfo = tr.ui.analysis.ObjectSnapshotView.getTypeInfo( | 82 var typeInfo = tr.ui.analysis.ObjectSnapshotView.getTypeInfo( |
83 snapshot.objectInstance.category, snapshot.objectInstance.typeName); | 83 snapshot.objectInstance.category, snapshot.objectInstance.typeName); |
84 if (typeInfo) { | 84 if (typeInfo) { |
85 var customView = new typeInfo.constructor(); | 85 var customView = new typeInfo.constructor(); |
86 this.appendChild(customView); | 86 Polymer.dom(this).appendChild(customView); |
87 customView.modelEvent = snapshot; | 87 customView.modelEvent = snapshot; |
88 } else { | 88 } else { |
89 this.appendGenericAnalysis_(snapshot); | 89 this.appendGenericAnalysis_(snapshot); |
90 } | 90 } |
91 }, | 91 }, |
92 | 92 |
93 appendGenericAnalysis_: function(snapshot) { | 93 appendGenericAnalysis_: function(snapshot) { |
94 var instance = snapshot.objectInstance; | 94 var instance = snapshot.objectInstance; |
95 | 95 |
96 this.textContent = ''; | 96 this.textContent = ''; |
97 | 97 |
98 var titleEl = document.createElement('div'); | 98 var titleEl = document.createElement('div'); |
99 titleEl.classList.add('title'); | 99 titleEl.classList.add('title'); |
100 titleEl.appendChild(document.createTextNode('Snapshot of ')); | 100 titleEl.appendChild(document.createTextNode('Snapshot of ')); |
101 this.appendChild(titleEl); | 101 Polymer.dom(this).appendChild(titleEl); |
102 | 102 |
103 var instanceLinkEl = document.createElement('tr-ui-a-analysis-link'); | 103 var instanceLinkEl = document.createElement('tr-ui-a-analysis-link'); |
104 instanceLinkEl.selection = new tr.model.EventSet(instance); | 104 instanceLinkEl.selection = new tr.model.EventSet(instance); |
105 titleEl.appendChild(instanceLinkEl); | 105 titleEl.appendChild(instanceLinkEl); |
106 | 106 |
107 titleEl.appendChild(document.createTextNode(' @ ')); | 107 titleEl.appendChild(document.createTextNode(' @ ')); |
108 | 108 |
109 titleEl.appendChild(tr.v.ui.createScalarSpan(snapshot.ts, { | 109 titleEl.appendChild(tr.v.ui.createScalarSpan(snapshot.ts, { |
110 unit: tr.v.Unit.byName.timeStampInMs, | 110 unit: tr.v.Unit.byName.timeStampInMs, |
111 ownerDocument: this.ownerDocument | 111 ownerDocument: this.ownerDocument |
112 })); | 112 })); |
113 | 113 |
114 var tableEl = document.createElement('table'); | 114 var tableEl = document.createElement('table'); |
115 this.appendChild(tableEl); | 115 Polymer.dom(this).appendChild(tableEl); |
116 | 116 |
117 var rowEl = document.createElement('tr'); | 117 var rowEl = document.createElement('tr'); |
118 tableEl.appendChild(rowEl); | 118 tableEl.appendChild(rowEl); |
119 | 119 |
120 var labelEl = document.createElement('td'); | 120 var labelEl = document.createElement('td'); |
121 labelEl.textContent = 'args:'; | 121 labelEl.textContent = 'args:'; |
122 rowEl.appendChild(labelEl); | 122 rowEl.appendChild(labelEl); |
123 | 123 |
124 var argsEl = document.createElement('td'); | 124 var argsEl = document.createElement('td'); |
125 argsEl.id = 'args'; | 125 argsEl.id = 'args'; |
126 rowEl.appendChild(argsEl); | 126 rowEl.appendChild(argsEl); |
127 | 127 |
128 var objectViewEl = document.createElement('tr-ui-a-generic-object-view'); | 128 var objectViewEl = document.createElement('tr-ui-a-generic-object-view'); |
129 objectViewEl.object = snapshot.args; | 129 objectViewEl.object = snapshot.args; |
130 argsEl.appendChild(objectViewEl); | 130 argsEl.appendChild(objectViewEl); |
131 } | 131 } |
132 }); | 132 }); |
133 </script> | 133 </script> |
OLD | NEW |