| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 { | 216 { |
| 217 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); | 217 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); |
| 218 }, | 218 }, |
| 219 | 219 |
| 220 /** | 220 /** |
| 221 * @return {!WebInspector.TimelineFrameModelBase} | 221 * @return {!WebInspector.TimelineFrameModelBase} |
| 222 */ | 222 */ |
| 223 _frameModel: function() | 223 _frameModel: function() |
| 224 { | 224 { |
| 225 if (!this._lazyFrameModel) { | 225 if (!this._lazyFrameModel) { |
| 226 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel()
; | 226 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel(t
his._model.target()); |
| 227 tracingFrameModel.addTraceEvents(this._model.inspectedTargetEvents()
, this._tracingModel.sessionId() || ""); | 227 tracingFrameModel.addTraceEvents(this._model.inspectedTargetEvents()
, this._tracingModel.sessionId() || ""); |
| 228 this._lazyFrameModel = tracingFrameModel; | 228 this._lazyFrameModel = tracingFrameModel; |
| 229 } | 229 } |
| 230 return this._lazyFrameModel; | 230 return this._lazyFrameModel; |
| 231 }, | 231 }, |
| 232 | 232 |
| 233 /** | 233 /** |
| 234 * @return {!WebInspector.TimelineView} | 234 * @return {!WebInspector.TimelineView} |
| 235 */ | 235 */ |
| 236 _timelineView: function() | 236 _timelineView: function() |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 this.showInDetails(content); | 987 this.showInDetails(content); |
| 988 this._showEventInPaintProfiler(event); | 988 this._showEventInPaintProfiler(event); |
| 989 }, | 989 }, |
| 990 | 990 |
| 991 /** | 991 /** |
| 992 * @param {!WebInspector.TracingModel.Event} event | 992 * @param {!WebInspector.TracingModel.Event} event |
| 993 * @param {boolean=} isCloseable | 993 * @param {boolean=} isCloseable |
| 994 */ | 994 */ |
| 995 _showEventInPaintProfiler: function(event, isCloseable) | 995 _showEventInPaintProfiler: function(event, isCloseable) |
| 996 { | 996 { |
| 997 if (!event.picture) | 997 var target = this._model.target(); |
| 998 if (!event.picture || !target) |
| 998 return; | 999 return; |
| 999 var paintProfilerView = this._paintProfilerView(); | 1000 var paintProfilerView = this._paintProfilerView(); |
| 1000 if (!this._detailsView.hasTab(WebInspector.TimelinePanel.DetailsTab.Pain
tProfiler)) | 1001 if (!this._detailsView.hasTab(WebInspector.TimelinePanel.DetailsTab.Pain
tProfiler)) |
| 1001 this._detailsView.appendTab(WebInspector.TimelinePanel.DetailsTab.Pa
intProfiler, WebInspector.UIString("Paint Profiler"), paintProfilerView, undefin
ed, undefined, isCloseable); | 1002 this._detailsView.appendTab(WebInspector.TimelinePanel.DetailsTab.Pa
intProfiler, WebInspector.UIString("Paint Profiler"), paintProfilerView, undefin
ed, undefined, isCloseable); |
| 1002 this._detailsView.selectTab(WebInspector.TimelinePanel.DetailsTab.PaintP
rofiler, true); | 1003 this._detailsView.selectTab(WebInspector.TimelinePanel.DetailsTab.PaintP
rofiler, true); |
| 1003 event.picture.requestObject(onGotObject); | 1004 event.picture.requestObject(onGotObject); |
| 1004 function onGotObject(result) | 1005 function onGotObject(result) |
| 1005 { | 1006 { |
| 1006 if (!result || !result["skp64"]) | 1007 if (!result || !result["skp64"]) |
| 1007 return; | 1008 return; |
| 1008 paintProfilerView.setPicture(event.thread.target(), result["skp64"])
; | 1009 paintProfilerView.setPicture(target, result["skp64"]); |
| 1009 } | 1010 } |
| 1010 }, | 1011 }, |
| 1011 | 1012 |
| 1012 /** | 1013 /** |
| 1013 * @param {number} startTime | 1014 * @param {number} startTime |
| 1014 * @param {number} endTime | 1015 * @param {number} endTime |
| 1015 */ | 1016 */ |
| 1016 _updateSelectedRangeStats: function(startTime, endTime) | 1017 _updateSelectedRangeStats: function(startTime, endTime) |
| 1017 { | 1018 { |
| 1018 // Return early in case 0 selection window. | 1019 // Return early in case 0 selection window. |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 | 1469 |
| 1469 WebInspector.TimelinePanelFactory.prototype = { | 1470 WebInspector.TimelinePanelFactory.prototype = { |
| 1470 /** | 1471 /** |
| 1471 * @return {!WebInspector.Panel} | 1472 * @return {!WebInspector.Panel} |
| 1472 */ | 1473 */ |
| 1473 createPanel: function() | 1474 createPanel: function() |
| 1474 { | 1475 { |
| 1475 return WebInspector.TimelinePanel._instance(); | 1476 return WebInspector.TimelinePanel._instance(); |
| 1476 } | 1477 } |
| 1477 } | 1478 } |
| OLD | NEW |