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

Unified Diff: Source/devtools/front_end/timeline/TimelinePanel.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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index 5f66fd65dee36a156e099ceb1d72c27293b9cb73..160fde87596d830f7e9edf202cbab5f1818a6c38 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -98,7 +98,7 @@ WebInspector.TimelinePanel = function()
this._categoryFilter = new WebInspector.TimelineCategoryFilter();
this._durationFilter = new WebInspector.TimelineIsLongFilter();
- this._textFilter = new WebInspector.TimelineTextFilter();
+ this._textFilter = new WebInspector.TimelineTextFilter(this._uiUtils);
this._model.addFilter(new WebInspector.TimelineHiddenFilter());
this._model.addFilter(this._categoryFilter);
@@ -937,7 +937,7 @@ WebInspector.TimelinePanel.prototype = {
if (record.endTime() < this._windowStartTime ||
record.startTime() > this._windowEndTime)
return;
- if (record.testContentMatching(searchRegExp))
+ if (this._uiUtils.testContentMatching(record, searchRegExp))
matches.push(record);
}
this._model.forAllFilteredRecords(processRecord.bind(this));
@@ -986,7 +986,8 @@ WebInspector.TimelinePanel.prototype = {
switch (this._selection.type()) {
case WebInspector.TimelineSelection.Type.Record:
var record = /** @type {!WebInspector.TimelineModel.Record} */ (this._selection.object());
- this._uiUtils.generateDetailsContent(record, this._model, this._detailsLinkifier, this.showInDetails.bind(this, record.title()), this._model.loadedFromFile());
+ var title = this._uiUtils.titleForRecord(record);
+ this._uiUtils.generateDetailsContent(record, this._model, this._detailsLinkifier, this.showInDetails.bind(this, title), this._model.loadedFromFile());
break;
case WebInspector.TimelineSelection.Type.TraceEvent:
var event = /** @type {!WebInspector.TracingModel.Event} */ (this._selection.object());
@@ -1379,10 +1380,12 @@ WebInspector.TimelineIsLongFilter.prototype = {
/**
* @constructor
* @extends {WebInspector.TimelineModel.Filter}
+ * @param {!WebInspector.TimelineUIUtils} uiUtils
*/
-WebInspector.TimelineTextFilter = function()
+WebInspector.TimelineTextFilter = function(uiUtils)
{
WebInspector.TimelineModel.Filter.call(this);
+ this._uiUtils = uiUtils;
}
WebInspector.TimelineTextFilter.prototype = {
@@ -1409,7 +1412,7 @@ WebInspector.TimelineTextFilter.prototype = {
*/
accept: function(record)
{
- return !this._regex || record.testContentMatching(this._regex);
+ return !this._regex || this._uiUtils.testContentMatching(record, this._regex);
},
__proto__: WebInspector.TimelineModel.Filter.prototype
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698