OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @unrestricted | 6 * @unrestricted |
7 */ | 7 */ |
8 Timeline.TimelineDetailsView = class extends UI.VBox { | 8 Timeline.TimelineDetailsView = class extends UI.VBox { |
9 /** | 9 /** |
10 * @param {!Array<!TimelineModel.TimelineModelFilter>} filters | 10 * @param {!Array<!TimelineModel.TimelineModelFilter>} filters |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 /** | 110 /** |
111 * @param {!Timeline.TimelineSelection} selection | 111 * @param {!Timeline.TimelineSelection} selection |
112 */ | 112 */ |
113 setSelection(selection) { | 113 setSelection(selection) { |
114 this._detailsLinkifier.reset(); | 114 this._detailsLinkifier.reset(); |
115 this._selection = selection; | 115 this._selection = selection; |
116 switch (this._selection.type()) { | 116 switch (this._selection.type()) { |
117 case Timeline.TimelineSelection.Type.TraceEvent: | 117 case Timeline.TimelineSelection.Type.TraceEvent: |
118 var event = /** @type {!SDK.TracingModel.Event} */ (this._selection.obje
ct()); | 118 var event = /** @type {!SDK.TracingModel.Event} */ (this._selection.obje
ct()); |
119 Timeline.TimelineUIUtils.buildTraceEventDetails( | 119 Timeline.TimelineUIUtils.buildTraceEventDetails( |
120 event, this._model.timelineModel(), this._detailsLinkifier, true, | 120 event, this._model.timelineModel(), this._detailsLinkifier, true) |
121 this._appendDetailsTabsForTraceEventAndShowDetails.bind(this, event)
); | 121 .then(fragment => this._appendDetailsTabsForTraceEventAndShowDet
ails(event, fragment)); |
122 break; | 122 break; |
123 case Timeline.TimelineSelection.Type.Frame: | 123 case Timeline.TimelineSelection.Type.Frame: |
124 var frame = /** @type {!TimelineModel.TimelineFrame} */ (this._selection
.object()); | 124 var frame = /** @type {!TimelineModel.TimelineFrame} */ (this._selection
.object()); |
125 var screenshotTime = frame.idle ? | 125 var screenshotTime = frame.idle ? |
126 frame.startTime : | 126 frame.startTime : |
127 frame.endTime; // For idle frames, look at the state at the beginni
ng of the frame. | 127 frame.endTime; // For idle frames, look at the state at the beginni
ng of the frame. |
128 var filmStripFrame = this._model.filmStripModel().frameByTimestamp(scree
nshotTime); | 128 var filmStripFrame = this._model.filmStripModel().frameByTimestamp(scree
nshotTime); |
129 if (filmStripFrame && filmStripFrame.timestamp - frame.endTime > 10) | 129 if (filmStripFrame && filmStripFrame.timestamp - frame.endTime > 10) |
130 filmStripFrame = null; | 130 filmStripFrame = null; |
131 this._setContent(Timeline.TimelineUIUtils.generateDetailsContentForFrame
(frame, filmStripFrame)); | 131 this._setContent(Timeline.TimelineUIUtils.generateDetailsContentForFrame
(frame, filmStripFrame)); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 * @enum {string} | 236 * @enum {string} |
237 */ | 237 */ |
238 Timeline.TimelineDetailsView.Tab = { | 238 Timeline.TimelineDetailsView.Tab = { |
239 Details: 'Details', | 239 Details: 'Details', |
240 Events: 'Events', | 240 Events: 'Events', |
241 CallTree: 'CallTree', | 241 CallTree: 'CallTree', |
242 BottomUp: 'BottomUp', | 242 BottomUp: 'BottomUp', |
243 PaintProfiler: 'PaintProfiler', | 243 PaintProfiler: 'PaintProfiler', |
244 LayerViewer: 'LayerViewer' | 244 LayerViewer: 'LayerViewer' |
245 }; | 245 }; |
OLD | NEW |