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

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

Issue 1940993002: DevTools: simplify Service Workers panel UI, remove non-actionable data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed. Created 4 years, 7 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 30 matching lines...) Expand all
41 this._resourcesLastSelectedItemSetting = WebInspector.settings.createSetting ("resourcesLastSelectedItem", {}); 41 this._resourcesLastSelectedItemSetting = WebInspector.settings.createSetting ("resourcesLastSelectedItem", {});
42 42
43 this._sidebarTree = new TreeOutlineInShadow(); 43 this._sidebarTree = new TreeOutlineInShadow();
44 this._sidebarTree.element.classList.add("resources-sidebar"); 44 this._sidebarTree.element.classList.add("resources-sidebar");
45 this._sidebarTree.registerRequiredCSS("resources/resourcesSidebar.css"); 45 this._sidebarTree.registerRequiredCSS("resources/resourcesSidebar.css");
46 this._sidebarTree.element.classList.add("filter-all", "outline-disclosure"); 46 this._sidebarTree.element.classList.add("filter-all", "outline-disclosure");
47 this.panelSidebarElement().appendChild(this._sidebarTree.element); 47 this.panelSidebarElement().appendChild(this._sidebarTree.element);
48 this.setDefaultFocusedElement(this._sidebarTree.element); 48 this.setDefaultFocusedElement(this._sidebarTree.element);
49 49
50 this._applicationTreeElement = this._addSidebarSection(WebInspector.UIString ("Application")); 50 this._applicationTreeElement = this._addSidebarSection(WebInspector.UIString ("Application"));
51 var manifestTreeElement = new WebInspector.AppManifestTreeElement(this); 51 this._manifestTreeElement = new WebInspector.AppManifestTreeElement(this);
52 this._applicationTreeElement.appendChild(manifestTreeElement); 52 this._applicationTreeElement.appendChild(this._manifestTreeElement);
53 53
54 var storageTreeElement = this._addSidebarSection(WebInspector.UIString("Stor age")); 54 var storageTreeElement = this._addSidebarSection(WebInspector.UIString("Stor age"));
55 this.localStorageListTreeElement = new WebInspector.StorageCategoryTreeEleme nt(this, WebInspector.UIString("Local Storage"), "LocalStorage", ["domstorage-st orage-tree-item", "local-storage"]); 55 this.localStorageListTreeElement = new WebInspector.StorageCategoryTreeEleme nt(this, WebInspector.UIString("Local Storage"), "LocalStorage", ["domstorage-st orage-tree-item", "local-storage"]);
56 storageTreeElement.appendChild(this.localStorageListTreeElement); 56 storageTreeElement.appendChild(this.localStorageListTreeElement);
57 this.sessionStorageListTreeElement = new WebInspector.StorageCategoryTreeEle ment(this, WebInspector.UIString("Session Storage"), "SessionStorage", ["domstor age-storage-tree-item", "session-storage"]); 57 this.sessionStorageListTreeElement = new WebInspector.StorageCategoryTreeEle ment(this, WebInspector.UIString("Session Storage"), "SessionStorage", ["domstor age-storage-tree-item", "session-storage"]);
58 storageTreeElement.appendChild(this.sessionStorageListTreeElement); 58 storageTreeElement.appendChild(this.sessionStorageListTreeElement);
59 this.indexedDBListTreeElement = new WebInspector.IndexedDBTreeElement(this); 59 this.indexedDBListTreeElement = new WebInspector.IndexedDBTreeElement(this);
60 storageTreeElement.appendChild(this.indexedDBListTreeElement); 60 storageTreeElement.appendChild(this.indexedDBListTreeElement);
61 this.databasesListTreeElement = new WebInspector.StorageCategoryTreeElement( this, WebInspector.UIString("Web SQL"), "Databases", ["database-storage-tree-ite m"]); 61 this.databasesListTreeElement = new WebInspector.StorageCategoryTreeElement( this, WebInspector.UIString("Web SQL"), "Databases", ["database-storage-tree-ite m"]);
62 storageTreeElement.appendChild(this.databasesListTreeElement); 62 storageTreeElement.appendChild(this.databasesListTreeElement);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 var treeElement = new TreeElement(title, true); 107 var treeElement = new TreeElement(title, true);
108 treeElement.listItemElement.classList.add("storage-group-list-item"); 108 treeElement.listItemElement.classList.add("storage-group-list-item");
109 treeElement.setCollapsible(false); 109 treeElement.setCollapsible(false);
110 treeElement.selectable = false; 110 treeElement.selectable = false;
111 this._sidebarTree.appendChild(treeElement); 111 this._sidebarTree.appendChild(treeElement);
112 return treeElement; 112 return treeElement;
113 }, 113 },
114 114
115 wasShown: function() 115 wasShown: function()
116 { 116 {
117 if (!this._sidebarTree.selectedTreeElement) { 117 if (!this._sidebarTree.selectedTreeElement)
118 if (this.serviceWorkersTreeElement) 118 this._manifestTreeElement.select();
119 this.serviceWorkersTreeElement.select();
120 else
121 this.localStorageListTreeElement.select();
122 }
123 }, 119 },
124 120
125 /** 121 /**
126 * @override 122 * @override
127 * @param {!WebInspector.Target} target 123 * @param {!WebInspector.Target} target
128 */ 124 */
129 targetAdded: function(target) 125 targetAdded: function(target)
130 { 126 {
131 if (this._target) 127 if (this._target)
132 return; 128 return;
133 this._target = target; 129 this._target = target;
134 130
135 if (target.serviceWorkerManager) { 131 if (target.serviceWorkerManager) {
136 this.serviceWorkersTreeElement = new WebInspector.ServiceWorkersTree Element(this); 132 this.serviceWorkersTreeElement = new WebInspector.ServiceWorkersTree Element(this);
137 this._applicationTreeElement.insertChild(this.serviceWorkersTreeElem ent, 0); 133 this._applicationTreeElement.appendChild(this.serviceWorkersTreeElem ent);
138 } 134 }
139 135
140 this._databaseModel = WebInspector.DatabaseModel.fromTarget(target); 136 this._databaseModel = WebInspector.DatabaseModel.fromTarget(target);
141 this._domStorageModel = WebInspector.DOMStorageModel.fromTarget(target); 137 this._domStorageModel = WebInspector.DOMStorageModel.fromTarget(target);
142 138
143 if (target.resourceTreeModel.cachedResourcesLoaded()) 139 if (target.resourceTreeModel.cachedResourcesLoaded())
144 this._initialize(); 140 this._initialize();
145 141
146 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel .EventTypes.Load, this._loadEventFired, this); 142 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel .EventTypes.Load, this._loadEventFired, this);
147 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel .EventTypes.CachedResourcesLoaded, this._initialize, this); 143 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel .EventTypes.CachedResourcesLoaded, this._initialize, this);
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 WebInspector.ResourcesPanelFactory.prototype = { 2154 WebInspector.ResourcesPanelFactory.prototype = {
2159 /** 2155 /**
2160 * @override 2156 * @override
2161 * @return {!WebInspector.Panel} 2157 * @return {!WebInspector.Panel}
2162 */ 2158 */
2163 createPanel: function() 2159 createPanel: function()
2164 { 2160 {
2165 return WebInspector.ResourcesPanel._instance(); 2161 return WebInspector.ResourcesPanel._instance();
2166 } 2162 }
2167 } 2163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698