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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 }; |
OLD | NEW |