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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 4 months 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
OLDNEW
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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 }, 688 },
689 689
690 /** 690 /**
691 * @override 691 * @override
692 */ 692 */
693 tracingComplete: function() 693 tracingComplete: function()
694 { 694 {
695 if (!this._tracingModel) 695 if (!this._tracingModel)
696 return; 696 return;
697 this._tracingModel.tracingComplete(); 697 this._tracingModel.tracingComplete();
698 var resourceTreeModel = this._target.resourceTreeModel; 698 WebInspector.targetManager.resumeReload(this._target);
699 this._target = null; 699 this._target = null;
700 setImmediate(resourceTreeModel.resumeReload.bind(resourceTreeModel));
pfeldman 2016/08/11 00:34:17 This setImmediate is lost.
eostroukhov-old 2016/08/17 01:09:02 It moved to the TargetManager.js
701 this._callback(new WebInspector.FilmStripModel(this._tracingModel, this. _timeCalculator.minimumBoundary() * 1000)); 700 this._callback(new WebInspector.FilmStripModel(this._tracingModel, this. _timeCalculator.minimumBoundary() * 1000));
702 delete this._callback; 701 delete this._callback;
703 }, 702 },
704 703
705 /** 704 /**
706 * @override 705 * @override
707 */ 706 */
708 tracingBufferUsage: function() 707 tracingBufferUsage: function()
709 { 708 {
710 }, 709 },
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 741
743 /** 742 /**
744 * @param {function(?WebInspector.FilmStripModel)} callback 743 * @param {function(?WebInspector.FilmStripModel)} callback
745 */ 744 */
746 stopRecording: function(callback) 745 stopRecording: function(callback)
747 { 746 {
748 if (!this._target) 747 if (!this._target)
749 return; 748 return;
750 749
751 this._target.tracingManager.stop(); 750 this._target.tracingManager.stop();
752 this._target.resourceTreeModel.suspendReload(); 751 WebInspector.targetManager.suspendReload(this._target);
753 this._callback = callback; 752 this._callback = callback;
754 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames ...")); 753 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames ..."));
755 } 754 }
756 } 755 }
757 756
758 /** 757 /**
759 * @constructor 758 * @constructor
760 * @implements {WebInspector.ActionDelegate} 759 * @implements {WebInspector.ActionDelegate}
761 */ 760 */
762 WebInspector.NetworkPanel.RecordActionDelegate = function() 761 WebInspector.NetworkPanel.RecordActionDelegate = function()
763 { 762 {
764 } 763 }
765 WebInspector.NetworkPanel.RecordActionDelegate.prototype = { 764 WebInspector.NetworkPanel.RecordActionDelegate.prototype = {
766 /** 765 /**
767 * @override 766 * @override
768 * @param {!WebInspector.Context} context 767 * @param {!WebInspector.Context} context
769 * @param {string} actionId 768 * @param {string} actionId
770 * @return {boolean} 769 * @return {boolean}
771 */ 770 */
772 handleAction: function(context, actionId) 771 handleAction: function(context, actionId)
773 { 772 {
774 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); 773 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel);
775 console.assert(panel && panel instanceof WebInspector.NetworkPanel); 774 console.assert(panel && panel instanceof WebInspector.NetworkPanel);
776 panel._toggleRecording(); 775 panel._toggleRecording();
777 return true; 776 return true;
778 } 777 }
779 } 778 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698