| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * @fileoverview TimelineView visualizes TRACE_EVENT events using the | 7 * @fileoverview TimelineView visualizes TRACE_EVENT events using the |
| 8 * tracing.Timeline component. | 8 * tracing.Timeline component. |
| 9 */ | 9 */ |
| 10 cr.define('tracing', function() { | 10 cr.define('tracing', function() { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 this.appendChild(this.timelineContainer_); | 60 this.appendChild(this.timelineContainer_); |
| 61 this.appendChild(summaryContainer_); | 61 this.appendChild(summaryContainer_); |
| 62 | 62 |
| 63 this.onSelectionChangedBoundToThis_ = this.onSelectionChanged_.bind(this); | 63 this.onSelectionChangedBoundToThis_ = this.onSelectionChanged_.bind(this); |
| 64 }, | 64 }, |
| 65 | 65 |
| 66 set traceData(traceData) { | 66 set traceData(traceData) { |
| 67 this.model = new tracing.TimelineModel(traceData); | 67 this.model = new tracing.TimelineModel(traceData); |
| 68 }, | 68 }, |
| 69 | 69 |
| 70 get model(model) { | 70 get model() { |
| 71 return this.timelineModel_; | 71 return this.timelineModel_; |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 set model(model) { | 74 set model(model) { |
| 75 this.timelineModel_ = model; | 75 this.timelineModel_ = model; |
| 76 | 76 |
| 77 // remove old timeline | 77 // remove old timeline |
| 78 this.timelineContainer_.textContent = ''; | 78 this.timelineContainer_.textContent = ''; |
| 79 | 79 |
| 80 // create new timeline if needed | 80 // create new timeline if needed |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 var oldScrollTop = this.timelineContainer_.scrollTop; | 188 var oldScrollTop = this.timelineContainer_.scrollTop; |
| 189 this.summaryEl_.textContent = text; | 189 this.summaryEl_.textContent = text; |
| 190 this.timelineContainer_.scrollTop = oldScrollTop; | 190 this.timelineContainer_.scrollTop = oldScrollTop; |
| 191 } | 191 } |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 return { | 194 return { |
| 195 TimelineView: TimelineView | 195 TimelineView: TimelineView |
| 196 }; | 196 }; |
| 197 }); | 197 }); |
| OLD | NEW |