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

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

Issue 710113002: DevTools: remove TimelineModel.Events.RecordAdded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comment Created 6 years, 1 month 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 /** 785 /**
786 * @param {number} startTime 786 * @param {number} startTime
787 * @param {number} endTime 787 * @param {number} endTime
788 */ 788 */
789 updateBoxSelection: function(startTime, endTime) 789 updateBoxSelection: function(startTime, endTime)
790 { 790 {
791 this._delegate.select(WebInspector.TimelineSelection.fromRange(startTime , endTime)); 791 this._delegate.select(WebInspector.TimelineSelection.fromRange(startTime , endTime));
792 }, 792 },
793 793
794 /** 794 /**
795 * @override
795 * @param {?RegExp} textFilter 796 * @param {?RegExp} textFilter
796 */ 797 */
797 refreshRecords: function(textFilter) 798 refreshRecords: function(textFilter)
798 { 799 {
799 this._dataProvider.reset(); 800 this._dataProvider.reset();
800 this._mainView.scheduleUpdate(); 801 this._mainView.scheduleUpdate();
801 }, 802 },
802 803
803 wasShown: function() 804 wasShown: function()
804 { 805 {
(...skipping 16 matching lines...) Expand all
821 this._mainView.setWindowTimes(0, Infinity); 822 this._mainView.setWindowTimes(0, Infinity);
822 }, 823 },
823 824
824 _onRecordingStarted: function() 825 _onRecordingStarted: function()
825 { 826 {
826 this._automaticallySizeWindow = true; 827 this._automaticallySizeWindow = true;
827 this._mainView.reset(); 828 this._mainView.reset();
828 }, 829 },
829 830
830 /** 831 /**
831 * @param {!WebInspector.TimelineModel.Record} record
832 */
833 addRecord: function(record)
834 {
835 this._dataProvider.reset();
836 if (this._automaticallySizeWindow) {
837 var minimumRecordTime = this._model.minimumRecordTime();
838 if (record.startTime() > (minimumRecordTime + 1000)) {
839 this._automaticallySizeWindow = false;
840 this._delegate.requestWindowTimes(minimumRecordTime, minimumReco rdTime + 1000);
841 }
842 this._mainView.scheduleUpdate();
843 } else {
844 if (!this._pendingUpdateTimer)
845 this._pendingUpdateTimer = window.setTimeout(this._updateOnAddRe cord.bind(this), 300);
846 }
847 },
848
849 _updateOnAddRecord: function()
850 {
851 delete this._pendingUpdateTimer;
852 this._mainView.scheduleUpdate();
853 },
854
855 /**
856 * @param {number} startTime 832 * @param {number} startTime
857 * @param {number} endTime 833 * @param {number} endTime
858 */ 834 */
859 setWindowTimes: function(startTime, endTime) 835 setWindowTimes: function(startTime, endTime)
860 { 836 {
861 this._mainView.setWindowTimes(startTime, endTime); 837 this._mainView.setWindowTimes(startTime, endTime);
862 this._delegate.select(null); 838 this._delegate.select(null);
863 }, 839 },
864 840
865 /** 841 /**
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 /** 889 /**
914 * @constructor 890 * @constructor
915 * @param {!WebInspector.TimelineSelection} selection 891 * @param {!WebInspector.TimelineSelection} selection
916 * @param {number} entryIndex 892 * @param {number} entryIndex
917 */ 893 */
918 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) 894 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex)
919 { 895 {
920 this.timelineSelection = selection; 896 this.timelineSelection = selection;
921 this.entryIndex = entryIndex; 897 this.entryIndex = entryIndex;
922 } 898 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/MemoryCountersGraph.js ('k') | Source/devtools/front_end/timeline/TimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698