OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 this._filters.push(Timeline.TimelineUIUtils.visibleEventsFilter()); | 60 this._filters.push(Timeline.TimelineUIUtils.visibleEventsFilter()); |
61 this._filters.push(new TimelineModel.ExcludeTopLevelFilter()); | 61 this._filters.push(new TimelineModel.ExcludeTopLevelFilter()); |
62 } | 62 } |
63 | 63 |
64 // Create models. | 64 // Create models. |
65 this._tracingModelBackingStorage = new Bindings.TempFileBackingStorage('trac
ing'); | 65 this._tracingModelBackingStorage = new Bindings.TempFileBackingStorage('trac
ing'); |
66 this._tracingModel = new SDK.TracingModel(this._tracingModelBackingStorage); | 66 this._tracingModel = new SDK.TracingModel(this._tracingModelBackingStorage); |
67 this._model = new TimelineModel.TimelineModel(Timeline.TimelineUIUtils.visib
leEventsFilter()); | 67 this._model = new TimelineModel.TimelineModel(Timeline.TimelineUIUtils.visib
leEventsFilter()); |
68 this._frameModel = | 68 this._frameModel = |
69 new TimelineModel.TimelineFrameModel(event => Timeline.TimelineUIUtils.e
ventStyle(event).category.name); | 69 new TimelineModel.TimelineFrameModel(event => Timeline.TimelineUIUtils.e
ventStyle(event).category.name); |
70 this._filmStripModel = new Components.FilmStripModel(this._tracingModel); | 70 this._filmStripModel = new SDK.FilmStripModel(this._tracingModel); |
71 this._irModel = new TimelineModel.TimelineIRModel(); | 71 this._irModel = new TimelineModel.TimelineIRModel(); |
72 /** @type {!Array<!{title: string, model: !SDK.TracingModel}>} */ | 72 /** @type {!Array<!{title: string, model: !SDK.TracingModel}>} */ |
73 this._extensionTracingModels = []; | 73 this._extensionTracingModels = []; |
74 this._cpuThrottlingManager = new Timeline.CPUThrottlingManager(); | 74 this._cpuThrottlingManager = new Timeline.CPUThrottlingManager(); |
75 | 75 |
76 /** @type {!Array<!Timeline.TimelineModeView>} */ | 76 /** @type {!Array<!Timeline.TimelineModeView>} */ |
77 this._currentViews = []; | 77 this._currentViews = []; |
78 | 78 |
79 this._captureJSProfileSetting = Common.settings.createSetting('timelineEnabl
eJSSampling', true); | 79 this._captureJSProfileSetting = Common.settings.createSetting('timelineEnabl
eJSSampling', true); |
80 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); | 80 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); |
81 this._captureFilmStripSetting = Common.settings.createSetting('timelineCaptu
reFilmStrip', false); | 81 this._captureFilmStripSetting = Common.settings.createSetting('timelineCaptu
reFilmStrip', false); |
82 | 82 |
83 this._showScreenshotsSetting = Common.settings.createLocalSetting('timelineS
howScreenshots', false); | 83 this._showScreenshotsSetting = Common.settings.createLocalSetting('timelineS
howScreenshots', false); |
84 this._showScreenshotsSetting.addChangeListener(this._onModeChanged, this); | 84 this._showScreenshotsSetting.addChangeListener(this._onModeChanged, this); |
85 this._showMemorySetting = Common.settings.createLocalSetting('timelineShowMe
mory', false); | 85 this._showMemorySetting = Common.settings.createLocalSetting('timelineShowMe
mory', false); |
86 this._showMemorySetting.addChangeListener(this._onModeChanged, this); | 86 this._showMemorySetting.addChangeListener(this._onModeChanged, this); |
87 | 87 |
88 this._panelToolbar = new UI.Toolbar('', this.element); | 88 this._panelToolbar = new UI.Toolbar('', this.element); |
89 | 89 |
90 this._timelinePane = new UI.VBox(); | 90 this._timelinePane = new UI.VBox(); |
91 this._timelinePane.show(this.element); | 91 this._timelinePane.show(this.element); |
92 var topPaneElement = this._timelinePane.element.createChild('div', 'hbox'); | 92 var topPaneElement = this._timelinePane.element.createChild('div', 'hbox'); |
93 topPaneElement.id = 'timeline-overview-panel'; | 93 topPaneElement.id = 'timeline-overview-panel'; |
94 | 94 |
95 // Create top overview component. | 95 // Create top overview component. |
96 this._overviewPane = new UI.TimelineOverviewPane('timeline'); | 96 this._overviewPane = new PerfUI.TimelineOverviewPane('timeline'); |
97 this._overviewPane.addEventListener(UI.TimelineOverviewPane.Events.WindowCha
nged, this._onWindowChanged.bind(this)); | 97 this._overviewPane.addEventListener( |
| 98 PerfUI.TimelineOverviewPane.Events.WindowChanged, this._onWindowChanged.
bind(this)); |
98 this._overviewPane.show(topPaneElement); | 99 this._overviewPane.show(topPaneElement); |
99 this._statusPaneContainer = this._timelinePane.element.createChild('div', 's
tatus-pane-container fill'); | 100 this._statusPaneContainer = this._timelinePane.element.createChild('div', 's
tatus-pane-container fill'); |
100 | 101 |
101 this._createFileSelector(); | 102 this._createFileSelector(); |
102 | 103 |
103 SDK.targetManager.addEventListener(SDK.TargetManager.Events.PageReloadReques
ted, this._pageReloadRequested, this); | 104 SDK.targetManager.addEventListener(SDK.TargetManager.Events.PageReloadReques
ted, this._pageReloadRequested, this); |
104 SDK.targetManager.addEventListener(SDK.TargetManager.Events.Load, this._load
EventFired, this); | 105 SDK.targetManager.addEventListener(SDK.TargetManager.Events.Load, this._load
EventFired, this); |
105 | 106 |
106 this._landingPage = new Timeline.TimelineLandingPage(); | 107 this._landingPage = new Timeline.TimelineLandingPage(); |
107 | 108 |
(...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 } | 1922 } |
1922 | 1923 |
1923 /** | 1924 /** |
1924 * @override | 1925 * @override |
1925 * @param {!SDK.Target} target | 1926 * @param {!SDK.Target} target |
1926 */ | 1927 */ |
1927 targetRemoved(target) { | 1928 targetRemoved(target) { |
1928 this._targets.remove(target, true); | 1929 this._targets.remove(target, true); |
1929 } | 1930 } |
1930 }; | 1931 }; |
OLD | NEW |