| 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/base/sorted_array_utils.html"> | 8 <link rel="import" href="/tracing/base/sorted_array_utils.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/multi_row_track.html"> | 10 <link rel="import" href="/tracing/ui/tracks/multi_row_track.html"> |
| 11 | 11 |
| 12 <script> | 12 <script> |
| 13 'use strict'; | 13 'use strict'; |
| 14 | 14 |
| 15 tr.exportTo('tr.ui.tracks', function() { | 15 tr.exportTo('tr.ui.tracks', function() { |
| 16 /** | 16 /** |
| 17 * A track that displays a SliceGroup. | 17 * A track that displays a SliceGroup. |
| 18 * @constructor | 18 * @constructor |
| 19 * @extends {MultiRowTrack} | 19 * @extends {MultiRowTrack} |
| 20 */ | 20 */ |
| 21 var SliceGroupTrack = tr.ui.b.define( | 21 var SliceGroupTrack = tr.ui.b.define( |
| 22 'slice-group-track', tr.ui.tracks.MultiRowTrack); | 22 'slice-group-track', tr.ui.tracks.MultiRowTrack); |
| 23 | 23 |
| 24 SliceGroupTrack.prototype = { | 24 SliceGroupTrack.prototype = { |
| 25 | 25 |
| 26 __proto__: tr.ui.tracks.MultiRowTrack.prototype, | 26 __proto__: tr.ui.tracks.MultiRowTrack.prototype, |
| 27 | 27 |
| 28 decorate: function(viewport) { | 28 decorate: function(viewport) { |
| 29 tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this, viewport); | 29 tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this, viewport); |
| 30 this.classList.add('slice-group-track'); | 30 Polymer.dom(this).classList.add('slice-group-track'); |
| 31 this.group_ = undefined; | 31 this.group_ = undefined; |
| 32 // Set the collapse threshold so we don't collapse by default, but the | 32 // Set the collapse threshold so we don't collapse by default, but the |
| 33 // user can explicitly collapse if they want it. | 33 // user can explicitly collapse if they want it. |
| 34 this.defaultToCollapsedWhenSubRowCountMoreThan = 100; | 34 this.defaultToCollapsedWhenSubRowCountMoreThan = 100; |
| 35 }, | 35 }, |
| 36 | 36 |
| 37 addSubTrack_: function(slices) { | 37 addSubTrack_: function(slices) { |
| 38 var track = new tr.ui.tracks.SliceTrack(this.viewport); | 38 var track = new tr.ui.tracks.SliceTrack(this.viewport); |
| 39 track.slices = slices; | 39 track.slices = slices; |
| 40 Polymer.dom(this).appendChild(track); | 40 Polymer.dom(this).appendChild(track); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 return subRows; | 160 return subRows; |
| 161 } | 161 } |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 return { | 164 return { |
| 165 SliceGroupTrack: SliceGroupTrack | 165 SliceGroupTrack: SliceGroupTrack |
| 166 }; | 166 }; |
| 167 }); | 167 }); |
| 168 </script> | 168 </script> |
| OLD | NEW |