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 Sample objects. 16 * @constructor 17 * @extends {RectTrack} 18 */ 19 var SampleTrack = tr.ui.b.define( 20 'sample-track', tr.ui.tracks.RectTrack); 21 22 SampleTrack.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 samples() { 31 return this.rects; 32 }, 33 34 set samples(samples) { 35 this.rects = samples; 36 } 37 }; 38 39 return { 40 SampleTrack: SampleTrack 41 }; 42}); 43</script> 44 45