Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 717243002: Timeline: do not imply event.thread.target is the main target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: avoid keep stale model in TimelineFrameModel Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() ;
227 tracingFrameModel.addTraceEvents(this._model.inspectedTargetEvents() , this._tracingModel.sessionId() || ""); 227 tracingFrameModel.addTraceEvents(this._model.target(), this._model.i nspectedTargetEvents(), 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()
237 { 237 {
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 this._progressElement.remove(); 782 this._progressElement.remove();
783 delete this._progressElement; 783 delete this._progressElement;
784 }, 784 },
785 785
786 _onRecordingStopped: function() 786 _onRecordingStopped: function()
787 { 787 {
788 this._stopPending = false; 788 this._stopPending = false;
789 this._updateToggleTimelineButton(false); 789 this._updateToggleTimelineButton(false);
790 if (this._lazyFrameModel) { 790 if (this._lazyFrameModel) {
791 this._lazyFrameModel.reset(); 791 this._lazyFrameModel.reset();
792 this._lazyFrameModel.addTraceEvents(this._model.inspectedTargetEvent s(), this._tracingModel.sessionId()); 792 this._lazyFrameModel.addTraceEvents(this._model.target(), this._mode l.inspectedTargetEvents(), this._tracingModel.sessionId());
793 } 793 }
794 this.requestWindowTimes(this._model.minimumRecordTime(), this._model.max imumRecordTime()); 794 this.requestWindowTimes(this._model.minimumRecordTime(), this._model.max imumRecordTime());
795 this._refreshViews(); 795 this._refreshViews();
796 this._hideProgressPane(); 796 this._hideProgressPane();
797 this._overviewPane.update(); 797 this._overviewPane.update();
798 this._updateSearchHighlight(false, true); 798 this._updateSearchHighlight(false, true);
799 }, 799 },
800 800
801 /** 801 /**
802 * @param {!WebInspector.Event} event 802 * @param {!WebInspector.Event} event
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698