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

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

Issue 2691433006: [Devtools] Persist network request blocking (Closed)
Patch Set: Merge branch 'ADD_ENABLE_DISABLE_REQUEST_BLOCKINg' into BLOCK_REQUESTS_IN_NETWORK_PERSISTANT 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 this._panelToolbar.appendToolbarItem(this._createBlockedURLsButton()); 179 this._panelToolbar.appendToolbarItem(this._createBlockedURLsButton());
180 this._panelToolbar.appendToolbarItem(NetworkConditions.NetworkConditionsSele ctor.createOfflineToolbarCheckbox()); 180 this._panelToolbar.appendToolbarItem(NetworkConditions.NetworkConditionsSele ctor.createOfflineToolbarCheckbox());
181 this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect()); 181 this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect());
182 this._panelToolbar.appendToolbarItem(new UI.ToolbarItem(this._progressBarCon tainer)); 182 this._panelToolbar.appendToolbarItem(new UI.ToolbarItem(this._progressBarCon tainer));
183 } 183 }
184 184
185 /** 185 /**
186 * @return {!UI.ToolbarItem} 186 * @return {!UI.ToolbarItem}
187 */ 187 */
188 _createBlockedURLsButton() { 188 _createBlockedURLsButton() {
189 var setting = Common.moduleSetting('blockedURLs'); 189 var setting = Common.moduleSetting('networkBlockedURLs');
190 setting.addChangeListener(updateAction); 190 setting.addChangeListener(updateAction);
191 var action = /** @type {!UI.Action }*/ (UI.actionRegistry.action('network.bl ocked-urls.show')); 191 var action = /** @type {!UI.Action }*/ (UI.actionRegistry.action('network.bl ocked-urls.show'));
192 var button = UI.Toolbar.createActionButton(action); 192 var button = UI.Toolbar.createActionButton(action);
193 button.setVisible(Runtime.experiments.isEnabled('requestBlocking')); 193 button.setVisible(Runtime.experiments.isEnabled('requestBlocking'));
194 updateAction(); 194 updateAction();
195 return button; 195 return button;
196 196
197 function updateAction() { 197 function updateAction() {
198 action.setToggled(!!setting.get().length); 198 action.setToggled(!!setting.get().length);
199 } 199 }
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 * @param {string} actionId 726 * @param {string} actionId
727 * @return {boolean} 727 * @return {boolean}
728 */ 728 */
729 handleAction(context, actionId) { 729 handleAction(context, actionId) {
730 var panel = UI.context.flavor(Network.NetworkPanel); 730 var panel = UI.context.flavor(Network.NetworkPanel);
731 console.assert(panel && panel instanceof Network.NetworkPanel); 731 console.assert(panel && panel instanceof Network.NetworkPanel);
732 panel._toggleRecording(); 732 panel._toggleRecording();
733 return true; 733 return true;
734 } 734 }
735 }; 735 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698