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

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

Issue 2653363002: [Devtools] Added typing to network in prep for removing unrestricted (Closed)
Patch Set: changes Created 3 years, 10 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 /** 626 /**
627 * @implements {SDK.TracingManagerClient} 627 * @implements {SDK.TracingManagerClient}
628 * @unrestricted 628 * @unrestricted
629 */ 629 */
630 Network.NetworkPanel.FilmStripRecorder = class { 630 Network.NetworkPanel.FilmStripRecorder = class {
631 /** 631 /**
632 * @param {!Network.NetworkTimeCalculator} timeCalculator 632 * @param {!Network.NetworkTimeCalculator} timeCalculator
633 * @param {!PerfUI.FilmStripView} filmStripView 633 * @param {!PerfUI.FilmStripView} filmStripView
634 */ 634 */
635 constructor(timeCalculator, filmStripView) { 635 constructor(timeCalculator, filmStripView) {
636 /** @type {?SDK.Target} */
637 this._target = null;
636 this._timeCalculator = timeCalculator; 638 this._timeCalculator = timeCalculator;
637 this._filmStripView = filmStripView; 639 this._filmStripView = filmStripView;
638 } 640 }
639 641
640 /** 642 /**
641 * @override 643 * @override
642 */ 644 */
643 tracingStarted() { 645 tracingStarted() {
644 } 646 }
645 647
646 /** 648 /**
647 * @override 649 * @override
648 * @param {!Array.<!SDK.TracingManager.EventPayload>} events 650 * @param {!Array.<!SDK.TracingManager.EventPayload>} events
649 */ 651 */
650 traceEventsCollected(events) { 652 traceEventsCollected(events) {
651 if (this._tracingModel) 653 if (this._tracingModel)
652 this._tracingModel.addEvents(events); 654 this._tracingModel.addEvents(events);
653 } 655 }
654 656
655 /** 657 /**
656 * @override 658 * @override
657 */ 659 */
658 tracingComplete() { 660 tracingComplete() {
659 if (!this._tracingModel) 661 if (!this._tracingModel || !this._target)
660 return; 662 return;
661 this._tracingModel.tracingComplete(); 663 this._tracingModel.tracingComplete();
662 SDK.targetManager.resumeReload(this._target); 664 SDK.targetManager.resumeReload(this._target);
663 this._target = null; 665 this._target = null;
664 this._callback(new SDK.FilmStripModel(this._tracingModel, this._timeCalculat or.minimumBoundary() * 1000)); 666 this._callback(new SDK.FilmStripModel(this._tracingModel, this._timeCalculat or.minimumBoundary() * 1000));
665 delete this._callback; 667 delete this._callback;
666 } 668 }
667 669
668 /** 670 /**
669 * @override 671 * @override
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 * @param {string} actionId 726 * @param {string} actionId
725 * @return {boolean} 727 * @return {boolean}
726 */ 728 */
727 handleAction(context, actionId) { 729 handleAction(context, actionId) {
728 var panel = UI.context.flavor(Network.NetworkPanel); 730 var panel = UI.context.flavor(Network.NetworkPanel);
729 console.assert(panel && panel instanceof Network.NetworkPanel); 731 console.assert(panel && panel instanceof Network.NetworkPanel);
730 panel._toggleRecording(); 732 panel._toggleRecording();
731 return true; 733 return true;
732 } 734 }
733 }; 735 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698