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

Unified Diff: Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 270693003: Timeline: make frames in TimelineView selectable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/TimelineFlameChart.js
diff --git a/Source/devtools/front_end/timeline/TimelineFlameChart.js b/Source/devtools/front_end/timeline/TimelineFlameChart.js
index 6c70e09493503d41c00d374367afdaeaa6ba1683..59a300af8c976b7addcb83334f2e0aa8166993bc 100644
--- a/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -874,10 +874,11 @@ WebInspector.TimelineFlameChart.prototype = {
},
/**
- * @param {?WebInspector.TimelineModel.Record|?WebInspector.TracingModel.Event} record
+ * @param {?WebInspector.TimelineSelection} selection
*/
- setSelectedRecord: function(record)
+ setSelection: function(selection)
{
+ var record = selection && selection.object();
yurys 2014/05/08 14:56:31 May be bail out early if selection has wrong type?
var entryRecords = this._dataProvider._records;
for (var entryIndex = 0; entryIndex < entryRecords.length; ++entryIndex) {
if (entryRecords[entryIndex] === record) {
@@ -896,7 +897,7 @@ WebInspector.TimelineFlameChart.prototype = {
var entryIndex = event.data;
var record = this._dataProvider._records[entryIndex];
if (record instanceof WebInspector.TimelineModel.Record)
- this._delegate.selectRecord(record);
+ this._delegate.select(WebInspector.TimelineSelection.fromRecord(record));
},
__proto__: WebInspector.VBox.prototype
« no previous file with comments | « Source/devtools/front_end/timeline/CountersGraph.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698