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/ui/base/draw_helpers.html"> | 8 <link rel="import" href="/tracing/ui/base/draw_helpers.html"> |
9 <link rel="import" href="/tracing/ui/base/ui.html"> | 9 <link rel="import" href="/tracing/ui/base/ui.html"> |
10 <link rel="import" href="/tracing/ui/tracks/alert_track.html"> | 10 <link rel="import" href="/tracing/ui/tracks/alert_track.html"> |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 }, | 192 }, |
193 | 193 |
194 appendCpuUsageTrack_: function() { | 194 appendCpuUsageTrack_: function() { |
195 var track = new tr.ui.tracks.CpuUsageTrack(this.viewport); | 195 var track = new tr.ui.tracks.CpuUsageTrack(this.viewport); |
196 track.initialize(this.model); | 196 track.initialize(this.model); |
197 if (!track.hasVisibleContent) | 197 if (!track.hasVisibleContent) |
198 return; | 198 return; |
199 this.appendChild(track); | 199 this.appendChild(track); |
200 }, | 200 }, |
201 | 201 |
| 202 appendCpuUsageTrack_: function() { |
| 203 var track = new tr.ui.tracks.CpuUsageTrack(this.viewport); |
| 204 track.initialize(this.model); |
| 205 if (!track.hasVisibleContent) |
| 206 return; |
| 207 this.appendChild(track); |
| 208 }, |
| 209 |
202 drawTrack: function(type) { | 210 drawTrack: function(type) { |
203 var ctx = this.context(); | 211 var ctx = this.context(); |
204 if (!this.model_) | 212 if (!this.model_) |
205 return; | 213 return; |
206 | 214 |
207 var pixelRatio = window.devicePixelRatio || 1; | 215 var pixelRatio = window.devicePixelRatio || 1; |
208 var bounds = this.getBoundingClientRect(); | 216 var bounds = this.getBoundingClientRect(); |
209 var canvasBounds = ctx.canvas.getBoundingClientRect(); | 217 var canvasBounds = ctx.canvas.getBoundingClientRect(); |
210 | 218 |
211 ctx.save(); | 219 ctx.save(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection. | 432 tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection. |
425 apply(this, arguments); | 433 apply(this, arguments); |
426 } | 434 } |
427 }; | 435 }; |
428 | 436 |
429 return { | 437 return { |
430 ModelTrack: ModelTrack | 438 ModelTrack: ModelTrack |
431 }; | 439 }; |
432 }); | 440 }); |
433 </script> | 441 </script> |
OLD | NEW |