| Index: chrome/browser/resources/tracing/timeline_track.js
|
| diff --git a/chrome/browser/resources/tracing/timeline_track.js b/chrome/browser/resources/tracing/timeline_track.js
|
| index cf2310771dedb109e43f4b4a3d8898c2a045eaf9..c1a968a158ceae3256b53b6b9a4f01bea5e8619c 100644
|
| --- a/chrome/browser/resources/tracing/timeline_track.js
|
| +++ b/chrome/browser/resources/tracing/timeline_track.js
|
| @@ -93,6 +93,22 @@ cr.define('tracing', function() {
|
| this.updateChildTracks_();
|
| },
|
|
|
| + /**
|
| + * @return {string} A human-readable name for the track.
|
| + */
|
| + get heading() {
|
| + if (!this.thread_)
|
| + return '';
|
| + var tname = this.thread_.name || this.thread_.tid;
|
| + return this.thread_.parent.pid + ': ' +
|
| + tname + ':';
|
| + },
|
| +
|
| + set headingWidth(width) {
|
| + for (var i = 0; i < this.tracks_.length; i++)
|
| + this.tracks_[i].headingWidth = width;
|
| + },
|
| +
|
| set viewport(v) {
|
| this.viewport_ = v;
|
| for (var i = 0; i < this.tracks_.length; i++)
|
| @@ -132,9 +148,7 @@ cr.define('tracing', function() {
|
| addTrack(this, this.thread_.subRows[srI]);
|
| }
|
| if (this.tracks_.length > 0) {
|
| - var tname = this.thread_.name || this.thread_.tid;
|
| - this.tracks_[0].heading = this.thread_.parent.pid + ': ' +
|
| - tname + ':';
|
| + this.tracks_[0].heading = this.heading;
|
| this.tracks_[0].tooltip = 'pid: ' + this.thread_.parent.pid +
|
| ', tid: ' + this.thread_.tid +
|
| (this.thread_.name ? ', name: ' + this.thread_.name : '');
|
| @@ -212,6 +226,14 @@ cr.define('tracing', function() {
|
| this.ctx_ = this.canvas_.getContext('2d');
|
| },
|
|
|
| + set headingWidth(width) {
|
| + this.headingDiv_.style.width = width;
|
| + },
|
| +
|
| + get heading() {
|
| + return this.headingDiv_.textContent;
|
| + },
|
| +
|
| set heading(text) {
|
| this.headingDiv_.textContent = text;
|
| },
|
| @@ -443,7 +465,7 @@ cr.define('tracing', function() {
|
| return index != undefined ? this.slices_[index] : undefined;
|
| },
|
|
|
| - /**
|
| + /**
|
| * Return the previous slice, if any, before the given slice.
|
| * @param {slice} A slice.
|
| * @return {slice} The previous slice, or undefined.
|
| @@ -455,7 +477,7 @@ cr.define('tracing', function() {
|
| else if ((index != undefined) && (index > 0))
|
| index--;
|
| return index != undefined ? this.slices_[index] : undefined;
|
| - },
|
| + }
|
|
|
| };
|
|
|
|
|