| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 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/base/color_scheme.html"> | 8 <link rel="import" href="/tracing/base/color_scheme.html"> |
| 9 <link rel="import" href="/tracing/ui/base/event_presenter.html"> | 9 <link rel="import" href="/tracing/ui/base/event_presenter.html"> |
| 10 <link rel="import" href="/tracing/ui/base/ui.html"> | 10 <link rel="import" href="/tracing/ui/base/ui.html"> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 this.frames_ = undefined; | 33 this.frames_ = undefined; |
| 34 this.items = undefined; | 34 this.items = undefined; |
| 35 }, | 35 }, |
| 36 | 36 |
| 37 get frames() { | 37 get frames() { |
| 38 return this.frames_; | 38 return this.frames_; |
| 39 }, | 39 }, |
| 40 | 40 |
| 41 set frames(frames) { | 41 set frames(frames) { |
| 42 this.frames_ = frames; | 42 this.frames_ = frames; |
| 43 if (frames === undefined) | 43 if (frames === undefined) return; |
| 44 return; | |
| 45 | 44 |
| 46 this.frames_ = this.frames_.slice(); | 45 this.frames_ = this.frames_.slice(); |
| 47 this.frames_.sort(startCompare); | 46 this.frames_.sort(startCompare); |
| 48 | 47 |
| 49 // letter dots | 48 // letter dots |
| 50 this.items = this.frames_.map(function(frame) { | 49 this.items = this.frames_.map(function(frame) { |
| 51 return new FrameDot(frame); | 50 return new FrameDot(frame); |
| 52 }); | 51 }); |
| 53 } | 52 } |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 /** | 55 /** |
| 57 * @constructor | 56 * @constructor |
| 58 * @extends {LetterDot} | 57 * @extends {LetterDot} |
| 59 */ | 58 */ |
| 60 function FrameDot(frame) { | 59 function FrameDot(frame) { |
| 61 tr.ui.tracks.LetterDot.call(this, frame, 'F', frame.colorId, frame.start); | 60 tr.ui.tracks.LetterDot.call(this, frame, 'F', frame.colorId, frame.start); |
| 62 } | 61 } |
| 63 | 62 |
| 64 FrameDot.prototype = { | 63 FrameDot.prototype = { |
| 65 __proto__: tr.ui.tracks.LetterDot.prototype | 64 __proto__: tr.ui.tracks.LetterDot.prototype |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 return { | 67 return { |
| 69 FrameTrack, | 68 FrameTrack, |
| 70 }; | 69 }; |
| 71 }); | 70 }); |
| 72 </script> | 71 </script> |
| OLD | NEW |