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

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: 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 15 matching lines...) Expand all
820 this._mainView.reset(); 821 this._mainView.reset();
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 * @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() 831 _updateOnAddRecord: function()
alph 2014/11/10 16:19:05 nuke?
yurys 2014/11/10 16:19:54 Done.
850 { 832 {
851 delete this._pendingUpdateTimer;
852 this._mainView.scheduleUpdate(); 833 this._mainView.scheduleUpdate();
853 }, 834 },
854 835
855 /** 836 /**
856 * @param {number} startTime 837 * @param {number} startTime
857 * @param {number} endTime 838 * @param {number} endTime
858 */ 839 */
859 setWindowTimes: function(startTime, endTime) 840 setWindowTimes: function(startTime, endTime)
860 { 841 {
861 this._mainView.setWindowTimes(startTime, endTime); 842 this._mainView.setWindowTimes(startTime, endTime);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 /** 894 /**
914 * @constructor 895 * @constructor
915 * @param {!WebInspector.TimelineSelection} selection 896 * @param {!WebInspector.TimelineSelection} selection
916 * @param {number} entryIndex 897 * @param {number} entryIndex
917 */ 898 */
918 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) 899 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex)
919 { 900 {
920 this.timelineSelection = selection; 901 this.timelineSelection = selection;
921 this.entryIndex = entryIndex; 902 this.entryIndex = entryIndex;
922 } 903 }
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