| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @constructor | 6 * @constructor |
| 7 */ | 7 */ |
| 8 WebInspector.TimelineIRModel = function() | 8 WebInspector.TimelineIRModel = function() |
| 9 { | 9 { |
| 10 this.reset(); | 10 this.reset(); |
| 11 } | 11 }; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * @enum {string} | 14 * @enum {string} |
| 15 */ | 15 */ |
| 16 WebInspector.TimelineIRModel.Phases = { | 16 WebInspector.TimelineIRModel.Phases = { |
| 17 Idle: "Idle", | 17 Idle: "Idle", |
| 18 Response: "Response", | 18 Response: "Response", |
| 19 Scroll: "Scroll", | 19 Scroll: "Scroll", |
| 20 Fling: "Fling", | 20 Fling: "Fling", |
| 21 Drag: "Drag", | 21 Drag: "Drag", |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 WebInspector.TimelineIRModel._eventIRPhase = Symbol("eventIRPhase"); | 66 WebInspector.TimelineIRModel._eventIRPhase = Symbol("eventIRPhase"); |
| 67 | 67 |
| 68 /** | 68 /** |
| 69 * @param {!WebInspector.TracingModel.Event} event | 69 * @param {!WebInspector.TracingModel.Event} event |
| 70 * @return {!WebInspector.TimelineIRModel.Phases} | 70 * @return {!WebInspector.TimelineIRModel.Phases} |
| 71 */ | 71 */ |
| 72 WebInspector.TimelineIRModel.phaseForEvent = function(event) | 72 WebInspector.TimelineIRModel.phaseForEvent = function(event) |
| 73 { | 73 { |
| 74 return event[WebInspector.TimelineIRModel._eventIRPhase]; | 74 return event[WebInspector.TimelineIRModel._eventIRPhase]; |
| 75 } | 75 }; |
| 76 | 76 |
| 77 WebInspector.TimelineIRModel.prototype = { | 77 WebInspector.TimelineIRModel.prototype = { |
| 78 /** | 78 /** |
| 79 * @param {?Array<!WebInspector.TracingModel.AsyncEvent>} inputLatencies | 79 * @param {?Array<!WebInspector.TracingModel.AsyncEvent>} inputLatencies |
| 80 * @param {?Array<!WebInspector.TracingModel.AsyncEvent>} animations | 80 * @param {?Array<!WebInspector.TracingModel.AsyncEvent>} animations |
| 81 */ | 81 */ |
| 82 populate: function(inputLatencies, animations) | 82 populate: function(inputLatencies, animations) |
| 83 { | 83 { |
| 84 var eventTypes = WebInspector.TimelineIRModel.InputEvents; | 84 var eventTypes = WebInspector.TimelineIRModel.InputEvents; |
| 85 var phases = WebInspector.TimelineIRModel.Phases; | 85 var phases = WebInspector.TimelineIRModel.Phases; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 if (!eventName.startsWith(prefix)) { | 324 if (!eventName.startsWith(prefix)) { |
| 325 if (eventName === WebInspector.TimelineIRModel.InputEvents.ImplSideF
ling) | 325 if (eventName === WebInspector.TimelineIRModel.InputEvents.ImplSideF
ling) |
| 326 return /** @type {!WebInspector.TimelineIRModel.InputEvents} */
(eventName); | 326 return /** @type {!WebInspector.TimelineIRModel.InputEvents} */
(eventName); |
| 327 console.error("Unrecognized input latency event: " + eventName); | 327 console.error("Unrecognized input latency event: " + eventName); |
| 328 return null; | 328 return null; |
| 329 } | 329 } |
| 330 return /** @type {!WebInspector.TimelineIRModel.InputEvents} */ (eventNa
me.substr(prefix.length)); | 330 return /** @type {!WebInspector.TimelineIRModel.InputEvents} */ (eventNa
me.substr(prefix.length)); |
| 331 } | 331 } |
| 332 }; | 332 }; |
| 333 | 333 |
| OLD | NEW |