OLD | NEW |
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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @implements {WebInspector.FlameChartDataProvider} | 33 * @implements {WebInspector.FlameChartDataProvider} |
34 * @implements {WebInspector.TimelineFlameChart.SelectionProvider} | 34 * @implements {WebInspector.TimelineFlameChart.SelectionProvider} |
35 * @param {!WebInspector.TimelineModel} model | 35 * @param {!WebInspector.TimelineModelImpl} model |
36 * @param {!WebInspector.TimelineFrameModelBase} frameModel | 36 * @param {!WebInspector.TimelineFrameModelBase} frameModel |
37 */ | 37 */ |
38 WebInspector.TimelineFlameChartDataProvider = function(model, frameModel) | 38 WebInspector.TimelineFlameChartDataProvider = function(model, frameModel) |
39 { | 39 { |
40 WebInspector.FlameChartDataProvider.call(this); | 40 WebInspector.FlameChartDataProvider.call(this); |
41 this._model = model; | 41 this._model = model; |
42 this._frameModel = frameModel; | 42 this._frameModel = frameModel; |
43 this._font = "12px " + WebInspector.fontFamily(); | 43 this._font = "12px " + WebInspector.fontFamily(); |
44 this._linkifier = new WebInspector.Linkifier(); | 44 this._linkifier = new WebInspector.Linkifier(); |
45 } | 45 } |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 */ | 809 */ |
810 WebInspector.TimelineFlameChart = function(delegate, model, tracingModel, frameM
odel) | 810 WebInspector.TimelineFlameChart = function(delegate, model, tracingModel, frameM
odel) |
811 { | 811 { |
812 WebInspector.VBox.call(this); | 812 WebInspector.VBox.call(this); |
813 this.element.classList.add("timeline-flamechart"); | 813 this.element.classList.add("timeline-flamechart"); |
814 this.registerRequiredCSS("flameChart.css"); | 814 this.registerRequiredCSS("flameChart.css"); |
815 this._delegate = delegate; | 815 this._delegate = delegate; |
816 this._model = model; | 816 this._model = model; |
817 this._dataProvider = tracingModel | 817 this._dataProvider = tracingModel |
818 ? new WebInspector.TracingBasedTimelineFlameChartDataProvider(tracingMod
el, frameModel, model.target()) | 818 ? new WebInspector.TracingBasedTimelineFlameChartDataProvider(tracingMod
el, frameModel, model.target()) |
819 : new WebInspector.TimelineFlameChartDataProvider(model, frameModel); | 819 : new WebInspector.TimelineFlameChartDataProvider(/** @type {!WebInspect
or.TimelineModelImpl} */(model), frameModel); |
820 this._mainView = new WebInspector.FlameChart(this._dataProvider, this, true)
; | 820 this._mainView = new WebInspector.FlameChart(this._dataProvider, this, true)
; |
821 this._mainView.show(this.element); | 821 this._mainView.show(this.element); |
822 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); | 822 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); |
823 this._mainView.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onEntrySelected, this); | 823 this._mainView.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onEntrySelected, this); |
824 } | 824 } |
825 | 825 |
826 WebInspector.TimelineFlameChart.prototype = { | 826 WebInspector.TimelineFlameChart.prototype = { |
827 dispose: function() | 827 dispose: function() |
828 { | 828 { |
829 this._model.removeEventListener(WebInspector.TimelineModel.Events.Record
ingStarted, this._onRecordingStarted, this); | 829 this._model.removeEventListener(WebInspector.TimelineModel.Events.Record
ingStarted, this._onRecordingStarted, this); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 * @param {number} entryIndex | 971 * @param {number} entryIndex |
972 * @return {?WebInspector.TimelineSelection} | 972 * @return {?WebInspector.TimelineSelection} |
973 */ | 973 */ |
974 createSelection: function(entryIndex) { }, | 974 createSelection: function(entryIndex) { }, |
975 /** | 975 /** |
976 * @param {?WebInspector.TimelineSelection} selection | 976 * @param {?WebInspector.TimelineSelection} selection |
977 * @return {number} | 977 * @return {number} |
978 */ | 978 */ |
979 entryIndexForSelection: function(selection) { } | 979 entryIndexForSelection: function(selection) { } |
980 } | 980 } |
OLD | NEW |