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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 /** 867 /**
868 * @param {?WebInspector.TimelineModel.Record} record 868 * @param {?WebInspector.TimelineModel.Record} record
869 * @param {string=} regex 869 * @param {string=} regex
870 * @param {boolean=} selectRecord 870 * @param {boolean=} selectRecord
871 */ 871 */
872 highlightSearchResult: function(record, regex, selectRecord) 872 highlightSearchResult: function(record, regex, selectRecord)
873 { 873 {
874 }, 874 },
875 875
876 /** 876 /**
877 * @param {?WebInspector.TimelineModel.Record|?WebInspector.TracingModel.Eve nt} record 877 * @param {?WebInspector.TimelineSelection} selection
878 */ 878 */
879 setSelectedRecord: function(record) 879 setSelection: function(selection)
880 { 880 {
881 var record = selection && selection.object();
yurys 2014/05/08 14:56:31 May be bail out early if selection has wrong type?
881 var entryRecords = this._dataProvider._records; 882 var entryRecords = this._dataProvider._records;
882 for (var entryIndex = 0; entryIndex < entryRecords.length; ++entryIndex) { 883 for (var entryIndex = 0; entryIndex < entryRecords.length; ++entryIndex) {
883 if (entryRecords[entryIndex] === record) { 884 if (entryRecords[entryIndex] === record) {
884 this._mainView.setSelectedEntry(entryIndex); 885 this._mainView.setSelectedEntry(entryIndex);
885 return; 886 return;
886 } 887 }
887 } 888 }
888 this._mainView.setSelectedEntry(-1); 889 this._mainView.setSelectedEntry(-1);
889 }, 890 },
890 891
891 /** 892 /**
892 * @param {!WebInspector.Event} event 893 * @param {!WebInspector.Event} event
893 */ 894 */
894 _onEntrySelected: function(event) 895 _onEntrySelected: function(event)
895 { 896 {
896 var entryIndex = event.data; 897 var entryIndex = event.data;
897 var record = this._dataProvider._records[entryIndex]; 898 var record = this._dataProvider._records[entryIndex];
898 if (record instanceof WebInspector.TimelineModel.Record) 899 if (record instanceof WebInspector.TimelineModel.Record)
899 this._delegate.selectRecord(record); 900 this._delegate.select(WebInspector.TimelineSelection.fromRecord(reco rd));
900 }, 901 },
901 902
902 __proto__: WebInspector.VBox.prototype 903 __proto__: WebInspector.VBox.prototype
903 } 904 }
OLDNEW
« 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