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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 692 this._tracingModel.addEvents(events); | 692 this._tracingModel.addEvents(events); |
| 693 } | 693 } |
| 694 | 694 |
| 695 /** | 695 /** |
| 696 * @override | 696 * @override |
| 697 */ | 697 */ |
| 698 tracingComplete() { | 698 tracingComplete() { |
| 699 if (!this._tracingModel || !this._target) | 699 if (!this._tracingModel || !this._target) |
| 700 return; | 700 return; |
| 701 this._tracingModel.tracingComplete(); | 701 this._tracingModel.tracingComplete(); |
| 702 SDK.targetManager.resumeReload(this._target); | 702 var resourceTreeModel = SDK.ResourceTreeModel.fromTarget(this._target); |
|
caseq
2017/02/27 23:13:38
nit: move down to actual usage.
dgozman
2017/02/28 01:58:17
this._target is reset in next line.
| |
| 703 this._target = null; | 703 this._target = null; |
| 704 this._callback(new SDK.FilmStripModel(this._tracingModel, this._timeCalculat or.minimumBoundary() * 1000)); | 704 this._callback(new SDK.FilmStripModel(this._tracingModel, this._timeCalculat or.minimumBoundary() * 1000)); |
| 705 delete this._callback; | 705 delete this._callback; |
| 706 if (resourceTreeModel) | |
| 707 resourceTreeModel.resumeReload(); | |
| 706 } | 708 } |
| 707 | 709 |
| 708 /** | 710 /** |
| 709 * @override | 711 * @override |
| 710 */ | 712 */ |
| 711 tracingBufferUsage() { | 713 tracingBufferUsage() { |
| 712 } | 714 } |
| 713 | 715 |
| 714 /** | 716 /** |
| 715 * @override | 717 * @override |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 740 } | 742 } |
| 741 | 743 |
| 742 /** | 744 /** |
| 743 * @param {function(?SDK.FilmStripModel)} callback | 745 * @param {function(?SDK.FilmStripModel)} callback |
| 744 */ | 746 */ |
| 745 stopRecording(callback) { | 747 stopRecording(callback) { |
| 746 if (!this._target) | 748 if (!this._target) |
| 747 return; | 749 return; |
| 748 | 750 |
| 749 this._target.tracingManager.stop(); | 751 this._target.tracingManager.stop(); |
| 750 SDK.targetManager.suspendReload(this._target); | 752 var resourceTreeModel = SDK.ResourceTreeModel.fromTarget(this._target); |
| 753 if (resourceTreeModel) | |
| 754 resourceTreeModel.suspendReload(); | |
| 751 this._callback = callback; | 755 this._callback = callback; |
| 752 this._filmStripView.setStatusText(Common.UIString('Fetching frames...')); | 756 this._filmStripView.setStatusText(Common.UIString('Fetching frames...')); |
| 753 } | 757 } |
| 754 }; | 758 }; |
| 755 | 759 |
| 756 /** | 760 /** |
| 757 * @implements {UI.ActionDelegate} | 761 * @implements {UI.ActionDelegate} |
| 758 * @unrestricted | 762 * @unrestricted |
| 759 */ | 763 */ |
| 760 Network.NetworkPanel.RecordActionDelegate = class { | 764 Network.NetworkPanel.RecordActionDelegate = class { |
| 761 /** | 765 /** |
| 762 * @override | 766 * @override |
| 763 * @param {!UI.Context} context | 767 * @param {!UI.Context} context |
| 764 * @param {string} actionId | 768 * @param {string} actionId |
| 765 * @return {boolean} | 769 * @return {boolean} |
| 766 */ | 770 */ |
| 767 handleAction(context, actionId) { | 771 handleAction(context, actionId) { |
| 768 var panel = UI.context.flavor(Network.NetworkPanel); | 772 var panel = UI.context.flavor(Network.NetworkPanel); |
| 769 console.assert(panel && panel instanceof Network.NetworkPanel); | 773 console.assert(panel && panel instanceof Network.NetworkPanel); |
| 770 panel._toggleRecording(); | 774 panel._toggleRecording(); |
| 771 return true; | 775 return true; |
| 772 } | 776 } |
| 773 }; | 777 }; |
| OLD | NEW |