Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModelImpl.js

Issue 336183005: Remove title() from TimelineModel.Record (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.TimelineModel} 7 * @extends {WebInspector.TimelineModel}
8 * @param {!WebInspector.TimelineManager} timelineManager 8 * @param {!WebInspector.TimelineManager} timelineManager
9 */ 9 */
10 WebInspector.TimelineModelImpl = function(timelineManager) 10 WebInspector.TimelineModelImpl = function(timelineManager)
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 /** 418 /**
419 * @return {!WebInspector.TimelineCategory} 419 * @return {!WebInspector.TimelineCategory}
420 */ 420 */
421 category: function() 421 category: function()
422 { 422 {
423 return WebInspector.TimelineUIUtils.recordStyle(this).category; 423 return WebInspector.TimelineUIUtils.recordStyle(this).category;
424 }, 424 },
425 425
426 /** 426 /**
427 * @return {string}
428 */
429 title: function()
430 {
431 return WebInspector.TimelineUIUtils.recordTitle(this, this._model);
432 },
433
434 /**
435 * @return {number} 427 * @return {number}
436 */ 428 */
437 startTime: function() 429 startTime: function()
438 { 430 {
439 return this._record.startTime; 431 return this._record.startTime;
440 }, 432 },
441 433
442 /** 434 /**
443 * @return {string|undefined} 435 * @return {string|undefined}
444 */ 436 */
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 this._warnings = []; 540 this._warnings = [];
549 this._warnings.push(message); 541 this._warnings.push(message);
550 }, 542 },
551 543
552 /** 544 /**
553 * @return {?Array.<string>} 545 * @return {?Array.<string>}
554 */ 546 */
555 warnings: function() 547 warnings: function()
556 { 548 {
557 return this._warnings; 549 return this._warnings;
558 }, 550 }
559
560 /**
561 * @param {!RegExp} regExp
562 * @return {boolean}
563 */
564 testContentMatching: function(regExp)
565 {
566 var tokens = [this.title()];
567 for (var key in this._record.data)
568 tokens.push(this._record.data[key])
569 return regExp.test(tokens.join("|"));
570 }
571 } 551 }
572 552
573 /** 553 /**
574 * @constructor 554 * @constructor
575 * @implements {WebInspector.OutputStream} 555 * @implements {WebInspector.OutputStream}
576 * @param {!WebInspector.TimelineModel} model 556 * @param {!WebInspector.TimelineModel} model
577 * @param {!{cancel: function()}} reader 557 * @param {!{cancel: function()}} reader
578 * @param {!WebInspector.Progress} progress 558 * @param {!WebInspector.Progress} progress
579 */ 559 */
580 WebInspector.TimelineModelLoader = function(model, reader, progress) 560 WebInspector.TimelineModelLoader = function(model, reader, progress)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 break; 730 break;
751 length += itemLength; 731 length += itemLength;
752 data.push(item); 732 data.push(item);
753 ++this._recordIndex; 733 ++this._recordIndex;
754 } 734 }
755 if (this._recordIndex === this._payloads.length) 735 if (this._recordIndex === this._payloads.length)
756 data.push(data.pop() + "]"); 736 data.push(data.pop() + "]");
757 stream.write(data.join(separator), this._writeNextChunk.bind(this)); 737 stream.write(data.join(separator), this._writeNextChunk.bind(this));
758 } 738 }
759 } 739 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698