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

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

Issue 2393763002: [DevTools] Cleanup DOMExtension.js. (Closed)
Patch Set: review comments Created 4 years, 2 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 */ 8 */
9 WebInspector.BlockedURLsPane = function() 9 WebInspector.BlockedURLsPane = function()
10 { 10 {
11 WebInspector.VBox.call(this, true); 11 WebInspector.VBox.call(this, true);
12 this.registerRequiredCSS("network/blockedURLsPane.css"); 12 this.registerRequiredCSS("network/blockedURLsPane.css");
13 this.contentElement.classList.add("blocked-urls-pane"); 13 this.contentElement.classList.add("blocked-urls-pane");
14 14
15 WebInspector.BlockedURLsPane._instance = this; 15 WebInspector.BlockedURLsPane._instance = this;
16 16
17 this._blockedURLsSetting = WebInspector.moduleSetting("blockedURLs"); 17 this._blockedURLsSetting = WebInspector.moduleSetting("blockedURLs");
18 this._blockedURLsSetting.addChangeListener(this._update, this); 18 this._blockedURLsSetting.addChangeListener(this._update, this);
19 19
20 this._toolbar = new WebInspector.Toolbar("", this.contentElement); 20 this._toolbar = new WebInspector.Toolbar("", this.contentElement);
21 this._toolbar.element.addEventListener("click", consumeEvent); 21 this._toolbar.element.addEventListener("click", (e) => e.consume());
22 var addButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add pa ttern"), "add-toolbar-item"); 22 var addButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add pa ttern"), "add-toolbar-item");
23 addButton.addEventListener("click", this._addButtonClicked.bind(this)); 23 addButton.addEventListener("click", this._addButtonClicked.bind(this));
24 this._toolbar.appendToolbarItem(addButton); 24 this._toolbar.appendToolbarItem(addButton);
25 var clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("Remo ve all"), "clear-toolbar-item"); 25 var clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("Remo ve all"), "clear-toolbar-item");
26 clearButton.addEventListener("click", this._removeAll.bind(this)); 26 clearButton.addEventListener("click", this._removeAll.bind(this));
27 this._toolbar.appendToolbarItem(clearButton); 27 this._toolbar.appendToolbarItem(clearButton);
28 28
29 this._emptyElement = this.contentElement.createChild("div", "no-blocked-urls "); 29 this._emptyElement = this.contentElement.createChild("div", "no-blocked-urls ");
30 this._emptyElement.createChild("span").textContent = WebInspector.UIString(" Requests are not blocked. "); 30 this._emptyElement.createChild("span").textContent = WebInspector.UIString(" Requests are not blocked. ");
31 var addLink = this._emptyElement.createChild("span", "link"); 31 var addLink = this._emptyElement.createChild("span", "link");
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 * @param {string} actionId 302 * @param {string} actionId
303 * @return {boolean} 303 * @return {boolean}
304 */ 304 */
305 handleAction: function(context, actionId) 305 handleAction: function(context, actionId)
306 { 306 {
307 WebInspector.viewManager.showView("network.blocked-urls"); 307 WebInspector.viewManager.showView("network.blocked-urls");
308 return true; 308 return true;
309 } 309 }
310 } 310 }
311 311
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698