1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 base.require('tracing.trace_model.timed_event');
10 * @fileoverview Provides the Slice class.
12 base.exportTo('tracing.trace_model', function() {
14 * A Slice represents an interval of time plus parameters associated
19 function Slice(category, title, colorId, start, args, opt_duration,
20 opt_threadStart, opt_threadDuration) {
21 tracing.trace_model.TimedEvent.call(this, start);
23 this.category = category || '';
25 this.colorId = colorId;
27 this.didNotFinish = false;
29 if (opt_duration !== undefined)
30 this.duration = opt_duration;
32 if (opt_threadStart !== undefined)
33 this.threadStart = opt_threadStart;
35 if (opt_threadDuration !== undefined)
36 this.threadDuration = opt_threadDuration;
40 __proto__: tracing.trace_model.TimedEvent.prototype,
42 get analysisTypeName() {