| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 }; | 678 }; |
| 679 | 679 |
| 680 /** | 680 /** |
| 681 * @implements {SDK.TargetManager.Observer} | 681 * @implements {SDK.TargetManager.Observer} |
| 682 * @unrestricted | 682 * @unrestricted |
| 683 */ | 683 */ |
| 684 SDK.MultitargetNetworkManager = class extends Common.Object { | 684 SDK.MultitargetNetworkManager = class extends Common.Object { |
| 685 constructor() { | 685 constructor() { |
| 686 super(); | 686 super(); |
| 687 | 687 |
| 688 /** @type {!Set<!Protocol.NetworkAgent>} */ |
| 689 this._agents = new Set(); |
| 690 |
| 688 /** @type {!Set<string>} */ | 691 /** @type {!Set<string>} */ |
| 689 this._blockedURLs = new Set(); | 692 this._blockedURLs = new Set(); |
| 690 this._blockedSetting = Common.moduleSetting('blockedURLs'); | 693 this._blockedSetting = Common.moduleSetting('networkBlockedURLs'); |
| 691 this._blockedSetting.addChangeListener(this._updateBlockedURLs, this); | 694 this._blockedSetting.addChangeListener(this._updateBlockedURLs, this); |
| 692 this._blockedSetting.set([]); | |
| 693 this._updateBlockedURLs(); | 695 this._updateBlockedURLs(); |
| 694 | 696 |
| 695 this._userAgentOverride = ''; | 697 this._userAgentOverride = ''; |
| 696 this._isRequestBlockingEnabled = false; | 698 this._isRequestBlockingEnabled = false; |
| 697 /** @type {!Set<!Protocol.NetworkAgent>} */ | |
| 698 this._agents = new Set(); | |
| 699 /** @type {!SDK.NetworkManager.Conditions} */ | 699 /** @type {!SDK.NetworkManager.Conditions} */ |
| 700 this._networkConditions = SDK.NetworkManager.NoThrottlingConditions; | 700 this._networkConditions = SDK.NetworkManager.NoThrottlingConditions; |
| 701 | 701 |
| 702 SDK.targetManager.observeTargets(this, SDK.Target.Capability.Network); | 702 SDK.targetManager.observeTargets(this, SDK.Target.Capability.Network); |
| 703 } | 703 } |
| 704 | 704 |
| 705 /** | 705 /** |
| 706 * @param {string} uaString | 706 * @param {string} uaString |
| 707 * @return {string} | 707 * @return {string} |
| 708 */ | 708 */ |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 */ | 937 */ |
| 938 constructor(enabled) { | 938 constructor(enabled) { |
| 939 this.enabled = enabled; | 939 this.enabled = enabled; |
| 940 } | 940 } |
| 941 }; | 941 }; |
| 942 | 942 |
| 943 /** | 943 /** |
| 944 * @type {!SDK.MultitargetNetworkManager} | 944 * @type {!SDK.MultitargetNetworkManager} |
| 945 */ | 945 */ |
| 946 SDK.multitargetNetworkManager; | 946 SDK.multitargetNetworkManager; |
| OLD | NEW |