OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 this._sessionId = sessionId; | 150 this._sessionId = sessionId; |
151 for (var i = 0; i < events.length; ++i) | 151 for (var i = 0; i < events.length; ++i) |
152 this._addTraceEvent(events[i]); | 152 this._addTraceEvent(events[i]); |
153 }, | 153 }, |
154 | 154 |
155 /** | 155 /** |
156 * @param {!WebInspector.TracingModel.Event} event | 156 * @param {!WebInspector.TracingModel.Event} event |
157 */ | 157 */ |
158 _addTraceEvent: function(event) | 158 _addTraceEvent: function(event) |
159 { | 159 { |
160 var eventNames = WebInspector.TimelineTraceEventBindings.RecordType; | 160 var eventNames = WebInspector.TracingTimelineModel.RecordType; |
161 | 161 |
162 if (event.name === eventNames.SetLayerTreeId) { | 162 if (event.name === eventNames.SetLayerTreeId) { |
163 if (this._sessionId === event.args["sessionId"]) | 163 if (this._sessionId === event.args["sessionId"]) |
164 this._layerTreeId = event.args["layerTreeId"]; | 164 this._layerTreeId = event.args["layerTreeId"]; |
165 return; | 165 return; |
166 } | 166 } |
167 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { | 167 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { |
168 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"])); | 168 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"])); |
169 return; | 169 return; |
170 } | 170 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 this._updateCpuTime(); | 459 this._updateCpuTime(); |
460 }, | 460 }, |
461 | 461 |
462 _updateCpuTime: function() | 462 _updateCpuTime: function() |
463 { | 463 { |
464 this.cpuTime = 0; | 464 this.cpuTime = 0; |
465 for (var key in this.timeByCategory) | 465 for (var key in this.timeByCategory) |
466 this.cpuTime += this.timeByCategory[key]; | 466 this.cpuTime += this.timeByCategory[key]; |
467 } | 467 } |
468 } | 468 } |
OLD | NEW |