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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js

Issue 1872673002: DevTools: introduce the bypass service worker checkbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2013 Samsung Electronics. 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 this._domStorageViews.clear(); 210 this._domStorageViews.clear();
211 this._domStorageTreeElements.clear(); 211 this._domStorageTreeElements.clear();
212 this._cookieViews = {}; 212 this._cookieViews = {};
213 213
214 this.databasesListTreeElement.removeChildren(); 214 this.databasesListTreeElement.removeChildren();
215 this.localStorageListTreeElement.removeChildren(); 215 this.localStorageListTreeElement.removeChildren();
216 this.sessionStorageListTreeElement.removeChildren(); 216 this.sessionStorageListTreeElement.removeChildren();
217 this.cookieListTreeElement.removeChildren(); 217 this.cookieListTreeElement.removeChildren();
218 this.cacheStorageListTreeElement.removeChildren(); 218 this.cacheStorageListTreeElement.removeChildren();
219 219
220 if (this.visibleView && !(this.visibleView instanceof WebInspector.Stora geCategoryView)) 220 if (this.visibleView && !(this.visibleView instanceof WebInspector.Stora geCategoryView) && !(this.visibleView instanceof WebInspector.ServiceWorkersView ))
221 this.visibleView.detach(); 221 this.visibleView.detach();
222 222
223 this._storageViewToolbar.removeToolbarItems(); 223 this._storageViewToolbar.removeToolbarItems();
224 224
225 if (this._sidebarTree.selectedTreeElement) 225 if (this._sidebarTree.selectedTreeElement)
226 this._sidebarTree.selectedTreeElement.deselect(); 226 this._sidebarTree.selectedTreeElement.deselect();
227 }, 227 },
228 228
229 _populateResourceTree: function() 229 _populateResourceTree: function()
230 { 230 {
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 if (this._view) 1506 if (this._view)
1507 this._view.clear(); 1507 this._view.clear();
1508 }, 1508 },
1509 1509
1510 __proto__: WebInspector.BaseStorageTreeElement.prototype 1510 __proto__: WebInspector.BaseStorageTreeElement.prototype
1511 } 1511 }
1512 1512
1513 1513
1514 /** 1514 /**
1515 * @constructor 1515 * @constructor
1516 * @extends {WebInspector.StorageCategoryTreeElement} 1516 * @extends {WebInspector.BaseStorageTreeElement}
1517 * @param {!WebInspector.ResourcesPanel} storagePanel 1517 * @param {!WebInspector.ResourcesPanel} storagePanel
1518 */ 1518 */
1519 WebInspector.ServiceWorkersTreeElement = function(storagePanel) 1519 WebInspector.ServiceWorkersTreeElement = function(storagePanel)
1520 { 1520 {
1521 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto r.UIString("Service Workers"), "Service Workers", ["service-workers-tree-item"]) ; 1521 WebInspector.BaseStorageTreeElement.call(this, storagePanel, "Service Worker s", ["service-workers-tree-item"], false);
1522 } 1522 }
1523 1523
1524 WebInspector.ServiceWorkersTreeElement.prototype = { 1524 WebInspector.ServiceWorkersTreeElement.prototype = {
1525 /** 1525 /**
1526 * @return {string}
1527 */
1528 get itemURL()
1529 {
1530 return "service-workers://";
1531 },
1532
1533 /**
1526 * @override 1534 * @override
1527 * @return {boolean} 1535 * @return {boolean}
1528 */ 1536 */
1529 onselect: function(selectedByUser) 1537 onselect: function(selectedByUser)
1530 { 1538 {
1531 WebInspector.StorageCategoryTreeElement.prototype.onselect.call(this, se lectedByUser); 1539 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
1532 if (!this._view) 1540 if (!this._view)
1533 this._view = new WebInspector.ServiceWorkersView(); 1541 this._view = new WebInspector.ServiceWorkersView();
1534 this._storagePanel.showServiceWorkersView(this._view); 1542 this._storagePanel.showServiceWorkersView(this._view);
1535 return false; 1543 return false;
1536 }, 1544 },
1537 1545
1538 __proto__: WebInspector.StorageCategoryTreeElement.prototype 1546 __proto__: WebInspector.BaseStorageTreeElement.prototype
1539 } 1547 }
1540 1548
1541 1549
1542 /** 1550 /**
1543 * @constructor 1551 * @constructor
1544 * @extends {WebInspector.StorageCategoryTreeElement} 1552 * @extends {WebInspector.StorageCategoryTreeElement}
1545 * @param {!WebInspector.ResourcesPanel} storagePanel 1553 * @param {!WebInspector.ResourcesPanel} storagePanel
1546 */ 1554 */
1547 WebInspector.IndexedDBTreeElement = function(storagePanel) 1555 WebInspector.IndexedDBTreeElement = function(storagePanel)
1548 { 1556 {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 WebInspector.ResourcesPanelFactory.prototype = { 2217 WebInspector.ResourcesPanelFactory.prototype = {
2210 /** 2218 /**
2211 * @override 2219 * @override
2212 * @return {!WebInspector.Panel} 2220 * @return {!WebInspector.Panel}
2213 */ 2221 */
2214 createPanel: function() 2222 createPanel: function()
2215 { 2223 {
2216 return WebInspector.ResourcesPanel._instance(); 2224 return WebInspector.ResourcesPanel._instance();
2217 } 2225 }
2218 } 2226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698