Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 709 }, | 709 }, |
| 710 | 710 |
| 711 /** | 711 /** |
| 712 * @override | 712 * @override |
| 713 */ | 713 */ |
| 714 tracingComplete: function() | 714 tracingComplete: function() |
| 715 { | 715 { |
| 716 if (!this._tracingModel) | 716 if (!this._tracingModel) |
| 717 return; | 717 return; |
| 718 this._tracingModel.tracingComplete(); | 718 this._tracingModel.tracingComplete(); |
| 719 var resourceTreeModel = this._target.resourceTreeModel; | 719 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(this._ target); |
|
pfeldman
2016/07/22 17:33:47
1) WebInspector.NetworkPanel.FilmStripRecorder sho
eostroukhov-old
2016/07/25 19:36:10
1) Ack, but not addressing here.
2) Routed through
| |
| 720 this._target = null; | 720 this._target = null; |
| 721 setImmediate(resourceTreeModel.resumeReload.bind(resourceTreeModel)); | 721 if (resourceTreeModel) |
| 722 setImmediate(resourceTreeModel.resumeReload.bind(resourceTreeModel)) ; | |
| 722 this._callback(new WebInspector.FilmStripModel(this._tracingModel, this. _timeCalculator.minimumBoundary() * 1000)); | 723 this._callback(new WebInspector.FilmStripModel(this._tracingModel, this. _timeCalculator.minimumBoundary() * 1000)); |
| 723 delete this._callback; | 724 delete this._callback; |
| 724 }, | 725 }, |
| 725 | 726 |
| 726 /** | 727 /** |
| 727 * @override | 728 * @override |
| 728 */ | 729 */ |
| 729 tracingBufferUsage: function() | 730 tracingBufferUsage: function() |
| 730 { | 731 { |
| 731 }, | 732 }, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 763 | 764 |
| 764 /** | 765 /** |
| 765 * @param {function(?WebInspector.FilmStripModel)} callback | 766 * @param {function(?WebInspector.FilmStripModel)} callback |
| 766 */ | 767 */ |
| 767 stopRecording: function(callback) | 768 stopRecording: function(callback) |
| 768 { | 769 { |
| 769 if (!this._target) | 770 if (!this._target) |
| 770 return; | 771 return; |
| 771 | 772 |
| 772 this._target.tracingManager.stop(); | 773 this._target.tracingManager.stop(); |
| 773 this._target.resourceTreeModel.suspendReload(); | 774 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(this._ target); |
| 775 if (resourceTreeModel) | |
| 776 resourceTreeModel.suspendReload(); | |
|
dgozman
2016/07/22 17:19:43
Let's proxy suspendReload and resumeReload through
eostroukhov-old
2016/07/25 19:36:10
Done - both for the supend and resume.
| |
| 774 this._callback = callback; | 777 this._callback = callback; |
| 775 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames ...")); | 778 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames ...")); |
| 776 } | 779 } |
| 777 } | 780 } |
| 778 | 781 |
| 779 /** | 782 /** |
| 780 * @constructor | 783 * @constructor |
| 781 * @implements {WebInspector.ActionDelegate} | 784 * @implements {WebInspector.ActionDelegate} |
| 782 */ | 785 */ |
| 783 WebInspector.NetworkPanel.RecordActionDelegate = function() | 786 WebInspector.NetworkPanel.RecordActionDelegate = function() |
| 784 { | 787 { |
| 785 } | 788 } |
| 786 WebInspector.NetworkPanel.RecordActionDelegate.prototype = { | 789 WebInspector.NetworkPanel.RecordActionDelegate.prototype = { |
| 787 /** | 790 /** |
| 788 * @override | 791 * @override |
| 789 * @param {!WebInspector.Context} context | 792 * @param {!WebInspector.Context} context |
| 790 * @param {string} actionId | 793 * @param {string} actionId |
| 791 * @return {boolean} | 794 * @return {boolean} |
| 792 */ | 795 */ |
| 793 handleAction: function(context, actionId) | 796 handleAction: function(context, actionId) |
| 794 { | 797 { |
| 795 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); | 798 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); |
| 796 console.assert(panel && panel instanceof WebInspector.NetworkPanel); | 799 console.assert(panel && panel instanceof WebInspector.NetworkPanel); |
| 797 panel._toggleRecording(); | 800 panel._toggleRecording(); |
| 798 return true; | 801 return true; |
| 799 } | 802 } |
| 800 } | 803 } |
| OLD | NEW |