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="stylesheet" | 8 <link rel="stylesheet" |
9 href="/tracing/ui/extras/system_stats/system_stats_snapshot_view.css"> | 9 href="/tracing/ui/extras/system_stats/system_stats_snapshot_view.css"> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 updateContents: function() { | 30 updateContents: function() { |
31 var snapshot = this.objectSnapshot_; | 31 var snapshot = this.objectSnapshot_; |
32 if (!snapshot || !snapshot.getStats()) { | 32 if (!snapshot || !snapshot.getStats()) { |
33 this.textContent = 'No system stats snapshot found.'; | 33 this.textContent = 'No system stats snapshot found.'; |
34 return; | 34 return; |
35 } | 35 } |
36 // Clear old snapshot view. | 36 // Clear old snapshot view. |
37 this.textContent = ''; | 37 this.textContent = ''; |
38 | 38 |
39 var stats = snapshot.getStats(); | 39 var stats = snapshot.getStats(); |
40 this.appendChild(this.buildList_(stats)); | 40 Polymer.dom(this).appendChild(this.buildList_(stats)); |
41 }, | 41 }, |
42 | 42 |
43 isFloat: function(n) { | 43 isFloat: function(n) { |
44 return typeof n === 'number' && n % 1 !== 0; | 44 return typeof n === 'number' && n % 1 !== 0; |
45 }, | 45 }, |
46 | 46 |
47 /** | 47 /** |
48 * Creates nested lists. | 48 * Creates nested lists. |
49 * | 49 * |
50 * @param {Object} stats The current trace system stats entry. | 50 * @param {Object} stats The current trace system stats entry. |
(...skipping 24 matching lines...) Expand all Loading... |
75 tr.ui.analysis.ObjectSnapshotView.register( | 75 tr.ui.analysis.ObjectSnapshotView.register( |
76 SystemStatsSnapshotView, | 76 SystemStatsSnapshotView, |
77 {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'}); | 77 {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'}); |
78 | 78 |
79 return { | 79 return { |
80 SystemStatsSnapshotView: SystemStatsSnapshotView | 80 SystemStatsSnapshotView: SystemStatsSnapshotView |
81 }; | 81 }; |
82 | 82 |
83 }); | 83 }); |
84 </script> | 84 </script> |
OLD | NEW |