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

Side by Side Diff: Source/devtools/front_end/TimelinePanel.js

Issue 183763036: TimelineFlameChart: selectRecord implementation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 6 years, 9 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 _onClearButtonClick: function() 575 _onClearButtonClick: function()
576 { 576 {
577 this._model.reset(); 577 this._model.reset();
578 }, 578 },
579 579
580 _onRecordsCleared: function() 580 _onRecordsCleared: function()
581 { 581 {
582 this.requestWindowTimes(0, Infinity); 582 this.requestWindowTimes(0, Infinity);
583 this._windowFilter._reset(); 583 this._windowFilter._reset();
584 delete this._selectedRecord;
584 if (this._lazyFrameModel) 585 if (this._lazyFrameModel)
585 this._lazyFrameModel.reset(); 586 this._lazyFrameModel.reset();
586 for (var i = 0; i < this._currentViews.length; ++i) 587 for (var i = 0; i < this._currentViews.length; ++i)
587 this._currentViews[i].reset(); 588 this._currentViews[i].reset();
588 this._overviewControl.reset(); 589 this._overviewControl.reset();
589 this._updateSelectionDetails(); 590 this._updateSelectionDetails();
590 }, 591 },
591 592
592 _onRecordingStarted: function() 593 _onRecordingStarted: function()
593 { 594 {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 */ 743 */
743 performSearch: function(query, shouldJump) 744 performSearch: function(query, shouldJump)
744 { 745 {
745 this._searchRegex = createPlainTextSearchRegex(query, "i"); 746 this._searchRegex = createPlainTextSearchRegex(query, "i");
746 delete this._searchResults; 747 delete this._searchResults;
747 this._updateSearchHighlight(true, shouldJump); 748 this._updateSearchHighlight(true, shouldJump);
748 }, 749 },
749 750
750 _updateSelectionDetails: function() 751 _updateSelectionDetails: function()
751 { 752 {
753 if (this._selectedRecord)
754 return;
755
752 var startTime = this._windowStartTime; 756 var startTime = this._windowStartTime;
753 var endTime = this._windowEndTime; 757 var endTime = this._windowEndTime;
754 758
755 // Return early in case 0 selection window. 759 // Return early in case 0 selection window.
756 if (startTime < 0) 760 if (startTime < 0)
757 return; 761 return;
758 762
759 var aggregatedStats = {}; 763 var aggregatedStats = {};
760 764
761 /** 765 /**
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 var title = WebInspector.UIString("%s \u2013 %s", Number.millisToString( startOffset), Number.millisToString(endOffset)); 815 var title = WebInspector.UIString("%s \u2013 %s", Number.millisToString( startOffset), Number.millisToString(endOffset));
812 this._detailsView.setContent(title, fragment); 816 this._detailsView.setContent(title, fragment);
813 }, 817 },
814 818
815 /** 819 /**
816 * @param {?WebInspector.TimelineModel.Record} record 820 * @param {?WebInspector.TimelineModel.Record} record
817 */ 821 */
818 selectRecord: function(record) 822 selectRecord: function(record)
819 { 823 {
820 this._detailsLinkifier.reset(); 824 this._detailsLinkifier.reset();
825 this._selectedRecord = record;
821 826
822 if (!record) { 827 if (!record) {
823 this._updateSelectionDetails(); 828 this._updateSelectionDetails();
824 return; 829 return;
825 } 830 }
826 831
827 for (var i = 0; i < this._currentViews.length; ++i) { 832 for (var i = 0; i < this._currentViews.length; ++i) {
828 var view = this._currentViews[i]; 833 var view = this._currentViews[i];
829 view.setSelectedRecord(record); 834 view.setSelectedRecord(record);
830 } 835 }
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 * @param {!WebInspector.TimelineModel.Record} record 1134 * @param {!WebInspector.TimelineModel.Record} record
1130 * @return {boolean} 1135 * @return {boolean}
1131 */ 1136 */
1132 accept: function(record) 1137 accept: function(record)
1133 { 1138 {
1134 return !this._hiddenRecords[record.type]; 1139 return !this._hiddenRecords[record.type];
1135 }, 1140 },
1136 1141
1137 __proto__: WebInspector.TimelineModel.Filter.prototype 1142 __proto__: WebInspector.TimelineModel.Filter.prototype
1138 } 1143 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TimelineFlameChart.js ('k') | Source/devtools/front_end/flameChart.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698