1<!DOCTYPE html> 2<!-- 3Copyright (c) 2013 The Chromium Authors. All rights reserved. 4Use of this source code is governed by a BSD-style license that can be 5found in the LICENSE file. 6--> 7 8<link rel="import" href="/tracing/ui/tracks/rect_track.html"> 9 10<script> 11'use strict'; 12 13tr.exportTo('tr.ui.tracks', function() { 14 /** 15 * A track that displays an array of Slice objects. 16 * @constructor 17 * @extends {RectTrack} 18 */ 19 var SliceTrack = tr.ui.b.define( 20 'slice-track', tr.ui.tracks.RectTrack); 21 22 SliceTrack.prototype = { 23 24 __proto__: tr.ui.tracks.RectTrack.prototype, 25 26 decorate: function(viewport) { 27 tr.ui.tracks.RectTrack.prototype.decorate.call(this, viewport); 28 }, 29 30 get slices() { 31 return this.rects; 32 }, 33 34 set slices(slices) { 35 this.rects = slices; 36 } 37 }; 38 39 return { 40 SliceTrack: SliceTrack 41 }; 42}); 43</script> 44 45