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

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

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 this._domStorageTreeElements = new Map(); 91 this._domStorageTreeElements = new Map();
92 /** @type {!Object.<string, !WebInspector.CookieItemsView>} */ 92 /** @type {!Object.<string, !WebInspector.CookieItemsView>} */
93 this._cookieViews = {}; 93 this._cookieViews = {};
94 /** @type {!Object.<string, boolean>} */ 94 /** @type {!Object.<string, boolean>} */
95 this._domains = {}; 95 this._domains = {};
96 96
97 this.panelSidebarElement().addEventListener("mousemove", this._onmousemove.b ind(this), false); 97 this.panelSidebarElement().addEventListener("mousemove", this._onmousemove.b ind(this), false);
98 this.panelSidebarElement().addEventListener("mouseleave", this._onmouseleave .bind(this), false); 98 this.panelSidebarElement().addEventListener("mouseleave", this._onmouseleave .bind(this), false);
99 99
100 WebInspector.targetManager.observeTargets(this); 100 WebInspector.targetManager.observeTargets(this);
101 } 101 };
102 102
103 WebInspector.ResourcesPanel.prototype = { 103 WebInspector.ResourcesPanel.prototype = {
104 /** 104 /**
105 * @param {string} title 105 * @param {string} title
106 * @return {!TreeElement} 106 * @return {!TreeElement}
107 */ 107 */
108 _addSidebarSection: function(title) 108 _addSidebarSection: function(title)
109 { 109 {
110 var treeElement = new TreeElement(title, true); 110 var treeElement = new TreeElement(title, true);
111 treeElement.listItemElement.classList.add("storage-group-list-item"); 111 treeElement.listItemElement.classList.add("storage-group-list-item");
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 _onmouseleave: function(event) 839 _onmouseleave: function(event)
840 { 840 {
841 if (this._previousHoveredElement) { 841 if (this._previousHoveredElement) {
842 this._previousHoveredElement.hovered = false; 842 this._previousHoveredElement.hovered = false;
843 delete this._previousHoveredElement; 843 delete this._previousHoveredElement;
844 } 844 }
845 }, 845 },
846 846
847 __proto__: WebInspector.PanelWithSidebar.prototype 847 __proto__: WebInspector.PanelWithSidebar.prototype
848 } 848 };
849 849
850 /** 850 /**
851 * @constructor 851 * @constructor
852 * @implements {WebInspector.Revealer} 852 * @implements {WebInspector.Revealer}
853 */ 853 */
854 WebInspector.ResourcesPanel.ResourceRevealer = function() 854 WebInspector.ResourcesPanel.ResourceRevealer = function()
855 { 855 {
856 } 856 };
857 857
858 WebInspector.ResourcesPanel.ResourceRevealer.prototype = { 858 WebInspector.ResourcesPanel.ResourceRevealer.prototype = {
859 /** 859 /**
860 * @override 860 * @override
861 * @param {!Object} resource 861 * @param {!Object} resource
862 * @return {!Promise} 862 * @return {!Promise}
863 */ 863 */
864 reveal: function(resource) 864 reveal: function(resource)
865 { 865 {
866 if (!(resource instanceof WebInspector.Resource)) 866 if (!(resource instanceof WebInspector.Resource))
867 return Promise.reject(new Error("Internal error: not a resource")); 867 return Promise.reject(new Error("Internal error: not a resource"));
868 var panel = WebInspector.ResourcesPanel._instance(); 868 var panel = WebInspector.ResourcesPanel._instance();
869 return WebInspector.viewManager.showView("resources").then(panel.showRes ource.bind(panel, resource)); 869 return WebInspector.viewManager.showView("resources").then(panel.showRes ource.bind(panel, resource));
870 } 870 }
871 } 871 };
872 872
873 /** 873 /**
874 * @constructor 874 * @constructor
875 * @extends {TreeElement} 875 * @extends {TreeElement}
876 * @param {!WebInspector.ResourcesPanel} storagePanel 876 * @param {!WebInspector.ResourcesPanel} storagePanel
877 * @param {string} title 877 * @param {string} title
878 * @param {?Array.<string>=} iconClasses 878 * @param {?Array.<string>=} iconClasses
879 * @param {boolean=} expandable 879 * @param {boolean=} expandable
880 * @param {boolean=} noIcon 880 * @param {boolean=} noIcon
881 */ 881 */
882 WebInspector.BaseStorageTreeElement = function(storagePanel, title, iconClasses, expandable, noIcon) 882 WebInspector.BaseStorageTreeElement = function(storagePanel, title, iconClasses, expandable, noIcon)
883 { 883 {
884 TreeElement.call(this, title, expandable); 884 TreeElement.call(this, title, expandable);
885 this._storagePanel = storagePanel; 885 this._storagePanel = storagePanel;
886 for (var i = 0; iconClasses && i < iconClasses.length; ++i) 886 for (var i = 0; iconClasses && i < iconClasses.length; ++i)
887 this.listItemElement.classList.add(iconClasses[i]); 887 this.listItemElement.classList.add(iconClasses[i]);
888 888
889 this._iconClasses = iconClasses; 889 this._iconClasses = iconClasses;
890 if (!noIcon) 890 if (!noIcon)
891 this.createIcon(); 891 this.createIcon();
892 } 892 };
893 893
894 WebInspector.BaseStorageTreeElement.prototype = { 894 WebInspector.BaseStorageTreeElement.prototype = {
895 /** 895 /**
896 * @override 896 * @override
897 * @return {boolean} 897 * @return {boolean}
898 */ 898 */
899 onselect: function(selectedByUser) 899 onselect: function(selectedByUser)
900 { 900 {
901 if (!selectedByUser) 901 if (!selectedByUser)
902 return false; 902 return false;
903 var itemURL = this.itemURL; 903 var itemURL = this.itemURL;
904 if (itemURL) 904 if (itemURL)
905 this._storagePanel._resourcesLastSelectedItemSetting.set(itemURL); 905 this._storagePanel._resourcesLastSelectedItemSetting.set(itemURL);
906 return false; 906 return false;
907 }, 907 },
908 908
909 __proto__: TreeElement.prototype 909 __proto__: TreeElement.prototype
910 } 910 };
911 911
912 /** 912 /**
913 * @constructor 913 * @constructor
914 * @extends {WebInspector.BaseStorageTreeElement} 914 * @extends {WebInspector.BaseStorageTreeElement}
915 * @param {!WebInspector.ResourcesPanel} storagePanel 915 * @param {!WebInspector.ResourcesPanel} storagePanel
916 * @param {string} categoryName 916 * @param {string} categoryName
917 * @param {string} settingsKey 917 * @param {string} settingsKey
918 * @param {?Array.<string>=} iconClasses 918 * @param {?Array.<string>=} iconClasses
919 * @param {boolean=} noIcon 919 * @param {boolean=} noIcon
920 */ 920 */
921 WebInspector.StorageCategoryTreeElement = function(storagePanel, categoryName, s ettingsKey, iconClasses, noIcon) 921 WebInspector.StorageCategoryTreeElement = function(storagePanel, categoryName, s ettingsKey, iconClasses, noIcon)
922 { 922 {
923 WebInspector.BaseStorageTreeElement.call(this, storagePanel, categoryName, i conClasses, false, noIcon); 923 WebInspector.BaseStorageTreeElement.call(this, storagePanel, categoryName, i conClasses, false, noIcon);
924 this._expandedSetting = WebInspector.settings.createSetting("resources" + se ttingsKey + "Expanded", settingsKey === "Frames"); 924 this._expandedSetting = WebInspector.settings.createSetting("resources" + se ttingsKey + "Expanded", settingsKey === "Frames");
925 this._categoryName = categoryName; 925 this._categoryName = categoryName;
926 } 926 };
927 927
928 WebInspector.StorageCategoryTreeElement.prototype = { 928 WebInspector.StorageCategoryTreeElement.prototype = {
929 /** 929 /**
930 * @return {!WebInspector.Target} 930 * @return {!WebInspector.Target}
931 */ 931 */
932 target: function() 932 target: function()
933 { 933 {
934 return this._storagePanel._target; 934 return this._storagePanel._target;
935 }, 935 },
936 936
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 970
971 /** 971 /**
972 * @override 972 * @override
973 */ 973 */
974 oncollapse: function() 974 oncollapse: function()
975 { 975 {
976 this._expandedSetting.set(false); 976 this._expandedSetting.set(false);
977 }, 977 },
978 978
979 __proto__: WebInspector.BaseStorageTreeElement.prototype 979 __proto__: WebInspector.BaseStorageTreeElement.prototype
980 } 980 };
981 981
982 /** 982 /**
983 * @constructor 983 * @constructor
984 * @extends {WebInspector.BaseStorageTreeElement} 984 * @extends {WebInspector.BaseStorageTreeElement}
985 * @param {!WebInspector.ResourcesPanel} storagePanel 985 * @param {!WebInspector.ResourcesPanel} storagePanel
986 * @param {!WebInspector.ResourceTreeFrame} frame 986 * @param {!WebInspector.ResourceTreeFrame} frame
987 */ 987 */
988 WebInspector.FrameTreeElement = function(storagePanel, frame) 988 WebInspector.FrameTreeElement = function(storagePanel, frame)
989 { 989 {
990 WebInspector.BaseStorageTreeElement.call(this, storagePanel, "", ["navigator -tree-item", "navigator-frame-tree-item"]); 990 WebInspector.BaseStorageTreeElement.call(this, storagePanel, "", ["navigator -tree-item", "navigator-frame-tree-item"]);
991 this._frame = frame; 991 this._frame = frame;
992 this.frameNavigated(frame); 992 this.frameNavigated(frame);
993 } 993 };
994 994
995 WebInspector.FrameTreeElement.prototype = { 995 WebInspector.FrameTreeElement.prototype = {
996 frameNavigated: function(frame) 996 frameNavigated: function(frame)
997 { 997 {
998 this.removeChildren(); 998 this.removeChildren();
999 this._frameId = frame.id; 999 this._frameId = frame.id;
1000 this.title = frame.displayName(); 1000 this.title = frame.displayName();
1001 this._categoryElements = {}; 1001 this._categoryElements = {};
1002 this._treeElementForResource = {}; 1002 this._treeElementForResource = {};
1003 1003
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 var childCount = parentTreeElement.childCount(); 1099 var childCount = parentTreeElement.childCount();
1100 var i; 1100 var i;
1101 for (i = 0; i < childCount; ++i) { 1101 for (i = 0; i < childCount; ++i) {
1102 if (compare(childTreeElement, parentTreeElement.childAt(i)) < 0) 1102 if (compare(childTreeElement, parentTreeElement.childAt(i)) < 0)
1103 break; 1103 break;
1104 } 1104 }
1105 parentTreeElement.insertChild(childTreeElement, i); 1105 parentTreeElement.insertChild(childTreeElement, i);
1106 }, 1106 },
1107 1107
1108 __proto__: WebInspector.BaseStorageTreeElement.prototype 1108 __proto__: WebInspector.BaseStorageTreeElement.prototype
1109 } 1109 };
1110 1110
1111 /** 1111 /**
1112 * @constructor 1112 * @constructor
1113 * @extends {WebInspector.BaseStorageTreeElement} 1113 * @extends {WebInspector.BaseStorageTreeElement}
1114 * @param {!WebInspector.ResourcesPanel} storagePanel 1114 * @param {!WebInspector.ResourcesPanel} storagePanel
1115 * @param {!WebInspector.Resource} resource 1115 * @param {!WebInspector.Resource} resource
1116 */ 1116 */
1117 WebInspector.FrameResourceTreeElement = function(storagePanel, resource) 1117 WebInspector.FrameResourceTreeElement = function(storagePanel, resource)
1118 { 1118 {
1119 WebInspector.BaseStorageTreeElement.call(this, storagePanel, resource.displa yName, ["navigator-tree-item", "navigator-file-tree-item", "navigator-" + resour ce.resourceType().name() + "-tree-item"]); 1119 WebInspector.BaseStorageTreeElement.call(this, storagePanel, resource.displa yName, ["navigator-tree-item", "navigator-file-tree-item", "navigator-" + resour ce.resourceType().name() + "-tree-item"]);
1120 /** @type {!WebInspector.Resource} */ 1120 /** @type {!WebInspector.Resource} */
1121 this._resource = resource; 1121 this._resource = resource;
1122 this.tooltip = resource.url; 1122 this.tooltip = resource.url;
1123 this._resource[WebInspector.FrameResourceTreeElement._symbol] = this; 1123 this._resource[WebInspector.FrameResourceTreeElement._symbol] = this;
1124 } 1124 };
1125 1125
1126 WebInspector.FrameResourceTreeElement._symbol = Symbol("treeElement"); 1126 WebInspector.FrameResourceTreeElement._symbol = Symbol("treeElement");
1127 1127
1128 WebInspector.FrameResourceTreeElement.prototype = { 1128 WebInspector.FrameResourceTreeElement.prototype = {
1129 get itemURL() 1129 get itemURL()
1130 { 1130 {
1131 return this._resource.url; 1131 return this._resource.url;
1132 }, 1132 },
1133 1133
1134 /** 1134 /**
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 { 1188 {
1189 if (!this._sourceView) { 1189 if (!this._sourceView) {
1190 var sourceFrame = new WebInspector.ResourceSourceFrame(this._resourc e); 1190 var sourceFrame = new WebInspector.ResourceSourceFrame(this._resourc e);
1191 sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); 1191 sourceFrame.setHighlighterType(this._resource.canonicalMimeType());
1192 this._sourceView = sourceFrame; 1192 this._sourceView = sourceFrame;
1193 } 1193 }
1194 return this._sourceView; 1194 return this._sourceView;
1195 }, 1195 },
1196 1196
1197 __proto__: WebInspector.BaseStorageTreeElement.prototype 1197 __proto__: WebInspector.BaseStorageTreeElement.prototype
1198 } 1198 };
1199 1199
1200 /** 1200 /**
1201 * @constructor 1201 * @constructor
1202 * @extends {WebInspector.BaseStorageTreeElement} 1202 * @extends {WebInspector.BaseStorageTreeElement}
1203 * @param {!WebInspector.ResourcesPanel} storagePanel 1203 * @param {!WebInspector.ResourcesPanel} storagePanel
1204 * @param {!WebInspector.Database} database 1204 * @param {!WebInspector.Database} database
1205 */ 1205 */
1206 WebInspector.DatabaseTreeElement = function(storagePanel, database) 1206 WebInspector.DatabaseTreeElement = function(storagePanel, database)
1207 { 1207 {
1208 WebInspector.BaseStorageTreeElement.call(this, storagePanel, database.name, ["database-tree-item", "resource-tree-item"], true); 1208 WebInspector.BaseStorageTreeElement.call(this, storagePanel, database.name, ["database-tree-item", "resource-tree-item"], true);
1209 this._database = database; 1209 this._database = database;
1210 } 1210 };
1211 1211
1212 WebInspector.DatabaseTreeElement.prototype = { 1212 WebInspector.DatabaseTreeElement.prototype = {
1213 get itemURL() 1213 get itemURL()
1214 { 1214 {
1215 return "database://" + encodeURI(this._database.name); 1215 return "database://" + encodeURI(this._database.name);
1216 }, 1216 },
1217 1217
1218 /** 1218 /**
1219 * @override 1219 * @override
1220 * @return {boolean} 1220 * @return {boolean}
(...skipping 24 matching lines...) Expand all
1245 function tableNamesCallback(tableNames) 1245 function tableNamesCallback(tableNames)
1246 { 1246 {
1247 var tableNamesLength = tableNames.length; 1247 var tableNamesLength = tableNames.length;
1248 for (var i = 0; i < tableNamesLength; ++i) 1248 for (var i = 0; i < tableNamesLength; ++i)
1249 this.appendChild(new WebInspector.DatabaseTableTreeElement(this. _storagePanel, this._database, tableNames[i])); 1249 this.appendChild(new WebInspector.DatabaseTableTreeElement(this. _storagePanel, this._database, tableNames[i]));
1250 } 1250 }
1251 this._database.getTableNames(tableNamesCallback.bind(this)); 1251 this._database.getTableNames(tableNamesCallback.bind(this));
1252 }, 1252 },
1253 1253
1254 __proto__: WebInspector.BaseStorageTreeElement.prototype 1254 __proto__: WebInspector.BaseStorageTreeElement.prototype
1255 } 1255 };
1256 1256
1257 /** 1257 /**
1258 * @constructor 1258 * @constructor
1259 * @extends {WebInspector.BaseStorageTreeElement} 1259 * @extends {WebInspector.BaseStorageTreeElement}
1260 */ 1260 */
1261 WebInspector.DatabaseTableTreeElement = function(storagePanel, database, tableNa me) 1261 WebInspector.DatabaseTableTreeElement = function(storagePanel, database, tableNa me)
1262 { 1262 {
1263 WebInspector.BaseStorageTreeElement.call(this, storagePanel, tableName, ["ta ble-tree-item", "resource-tree-item"]); 1263 WebInspector.BaseStorageTreeElement.call(this, storagePanel, tableName, ["ta ble-tree-item", "resource-tree-item"]);
1264 this._database = database; 1264 this._database = database;
1265 this._tableName = tableName; 1265 this._tableName = tableName;
1266 } 1266 };
1267 1267
1268 WebInspector.DatabaseTableTreeElement.prototype = { 1268 WebInspector.DatabaseTableTreeElement.prototype = {
1269 get itemURL() 1269 get itemURL()
1270 { 1270 {
1271 return "database://" + encodeURI(this._database.name) + "/" + encodeURI( this._tableName); 1271 return "database://" + encodeURI(this._database.name) + "/" + encodeURI( this._tableName);
1272 }, 1272 },
1273 1273
1274 /** 1274 /**
1275 * @override 1275 * @override
1276 * @return {boolean} 1276 * @return {boolean}
1277 */ 1277 */
1278 onselect: function(selectedByUser) 1278 onselect: function(selectedByUser)
1279 { 1279 {
1280 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 1280 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
1281 this._storagePanel._showDatabase(this._database, this._tableName); 1281 this._storagePanel._showDatabase(this._database, this._tableName);
1282 return false; 1282 return false;
1283 }, 1283 },
1284 1284
1285 __proto__: WebInspector.BaseStorageTreeElement.prototype 1285 __proto__: WebInspector.BaseStorageTreeElement.prototype
1286 } 1286 };
1287 1287
1288 1288
1289 /** 1289 /**
1290 * @constructor 1290 * @constructor
1291 * @extends {WebInspector.StorageCategoryTreeElement} 1291 * @extends {WebInspector.StorageCategoryTreeElement}
1292 * @param {!WebInspector.ResourcesPanel} storagePanel 1292 * @param {!WebInspector.ResourcesPanel} storagePanel
1293 */ 1293 */
1294 WebInspector.ServiceWorkerCacheTreeElement = function(storagePanel) 1294 WebInspector.ServiceWorkerCacheTreeElement = function(storagePanel)
1295 { 1295 {
1296 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto r.UIString("Cache Storage"), "CacheStorage", ["database-tree-item", "resource-tr ee-item"]); 1296 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto r.UIString("Cache Storage"), "CacheStorage", ["database-tree-item", "resource-tr ee-item"]);
1297 } 1297 };
1298 1298
1299 WebInspector.ServiceWorkerCacheTreeElement.prototype = { 1299 WebInspector.ServiceWorkerCacheTreeElement.prototype = {
1300 _initialize: function() 1300 _initialize: function()
1301 { 1301 {
1302 /** @type {!Array.<!WebInspector.SWCacheTreeElement>} */ 1302 /** @type {!Array.<!WebInspector.SWCacheTreeElement>} */
1303 this._swCacheTreeElements = []; 1303 this._swCacheTreeElements = [];
1304 var target = this._storagePanel._target; 1304 var target = this._storagePanel._target;
1305 var model = target && WebInspector.ServiceWorkerCacheModel.fromTarget(ta rget); 1305 var model = target && WebInspector.ServiceWorkerCacheModel.fromTarget(ta rget);
1306 if (model) { 1306 if (model) {
1307 for (var cache of model.caches()) 1307 for (var cache of model.caches())
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 index = i; 1386 index = i;
1387 break; 1387 break;
1388 } 1388 }
1389 } 1389 }
1390 if (index !== -1) 1390 if (index !== -1)
1391 return this._swCacheTreeElements[i]; 1391 return this._swCacheTreeElements[i];
1392 return null; 1392 return null;
1393 }, 1393 },
1394 1394
1395 __proto__: WebInspector.StorageCategoryTreeElement.prototype 1395 __proto__: WebInspector.StorageCategoryTreeElement.prototype
1396 } 1396 };
1397 1397
1398 /** 1398 /**
1399 * @constructor 1399 * @constructor
1400 * @extends {WebInspector.BaseStorageTreeElement} 1400 * @extends {WebInspector.BaseStorageTreeElement}
1401 * @param {!WebInspector.ResourcesPanel} storagePanel 1401 * @param {!WebInspector.ResourcesPanel} storagePanel
1402 * @param {!WebInspector.ServiceWorkerCacheModel} model 1402 * @param {!WebInspector.ServiceWorkerCacheModel} model
1403 * @param {!WebInspector.ServiceWorkerCacheModel.Cache} cache 1403 * @param {!WebInspector.ServiceWorkerCacheModel.Cache} cache
1404 */ 1404 */
1405 WebInspector.SWCacheTreeElement = function(storagePanel, model, cache) 1405 WebInspector.SWCacheTreeElement = function(storagePanel, model, cache)
1406 { 1406 {
1407 WebInspector.BaseStorageTreeElement.call(this, storagePanel, cache.cacheName + " - " + cache.securityOrigin, ["table-tree-item", "resource-tree-item"]); 1407 WebInspector.BaseStorageTreeElement.call(this, storagePanel, cache.cacheName + " - " + cache.securityOrigin, ["table-tree-item", "resource-tree-item"]);
1408 this._model = model; 1408 this._model = model;
1409 this._cache = cache; 1409 this._cache = cache;
1410 } 1410 };
1411 1411
1412 WebInspector.SWCacheTreeElement.prototype = { 1412 WebInspector.SWCacheTreeElement.prototype = {
1413 get itemURL() 1413 get itemURL()
1414 { 1414 {
1415 // I don't think this will work at all. 1415 // I don't think this will work at all.
1416 return "cache://" + this._cache.cacheId; 1416 return "cache://" + this._cache.cacheId;
1417 }, 1417 },
1418 1418
1419 onattach: function() 1419 onattach: function()
1420 { 1420 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 return false; 1458 return false;
1459 }, 1459 },
1460 1460
1461 clear: function() 1461 clear: function()
1462 { 1462 {
1463 if (this._view) 1463 if (this._view)
1464 this._view.clear(); 1464 this._view.clear();
1465 }, 1465 },
1466 1466
1467 __proto__: WebInspector.BaseStorageTreeElement.prototype 1467 __proto__: WebInspector.BaseStorageTreeElement.prototype
1468 } 1468 };
1469 1469
1470 1470
1471 /** 1471 /**
1472 * @constructor 1472 * @constructor
1473 * @extends {WebInspector.BaseStorageTreeElement} 1473 * @extends {WebInspector.BaseStorageTreeElement}
1474 * @param {!WebInspector.ResourcesPanel} storagePanel 1474 * @param {!WebInspector.ResourcesPanel} storagePanel
1475 */ 1475 */
1476 WebInspector.ServiceWorkersTreeElement = function(storagePanel) 1476 WebInspector.ServiceWorkersTreeElement = function(storagePanel)
1477 { 1477 {
1478 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI String("Service Workers"), ["service-worker-tree-item", "resource-tree-item"], f alse); 1478 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI String("Service Workers"), ["service-worker-tree-item", "resource-tree-item"], f alse);
1479 } 1479 };
1480 1480
1481 WebInspector.ServiceWorkersTreeElement.prototype = { 1481 WebInspector.ServiceWorkersTreeElement.prototype = {
1482 /** 1482 /**
1483 * @return {string} 1483 * @return {string}
1484 */ 1484 */
1485 get itemURL() 1485 get itemURL()
1486 { 1486 {
1487 return "service-workers://"; 1487 return "service-workers://";
1488 }, 1488 },
1489 1489
1490 /** 1490 /**
1491 * @override 1491 * @override
1492 * @return {boolean} 1492 * @return {boolean}
1493 */ 1493 */
1494 onselect: function(selectedByUser) 1494 onselect: function(selectedByUser)
1495 { 1495 {
1496 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 1496 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
1497 if (!this._view) 1497 if (!this._view)
1498 this._view = new WebInspector.ServiceWorkersView(); 1498 this._view = new WebInspector.ServiceWorkersView();
1499 this._storagePanel._innerShowView(this._view); 1499 this._storagePanel._innerShowView(this._view);
1500 return false; 1500 return false;
1501 }, 1501 },
1502 1502
1503 __proto__: WebInspector.BaseStorageTreeElement.prototype 1503 __proto__: WebInspector.BaseStorageTreeElement.prototype
1504 } 1504 };
1505 1505
1506 /** 1506 /**
1507 * @constructor 1507 * @constructor
1508 * @extends {WebInspector.BaseStorageTreeElement} 1508 * @extends {WebInspector.BaseStorageTreeElement}
1509 * @param {!WebInspector.ResourcesPanel} storagePanel 1509 * @param {!WebInspector.ResourcesPanel} storagePanel
1510 */ 1510 */
1511 WebInspector.AppManifestTreeElement = function(storagePanel) 1511 WebInspector.AppManifestTreeElement = function(storagePanel)
1512 { 1512 {
1513 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI String("Manifest"), ["manifest-tree-item", "resource-tree-item"], false, false); 1513 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI String("Manifest"), ["manifest-tree-item", "resource-tree-item"], false, false);
1514 } 1514 };
1515 1515
1516 WebInspector.AppManifestTreeElement.prototype = { 1516 WebInspector.AppManifestTreeElement.prototype = {
1517 /** 1517 /**
1518 * @return {string} 1518 * @return {string}
1519 */ 1519 */
1520 get itemURL() 1520 get itemURL()
1521 { 1521 {
1522 return "manifest://"; 1522 return "manifest://";
1523 }, 1523 },
1524 1524
1525 /** 1525 /**
1526 * @override 1526 * @override
1527 * @return {boolean} 1527 * @return {boolean}
1528 */ 1528 */
1529 onselect: function(selectedByUser) 1529 onselect: function(selectedByUser)
1530 { 1530 {
1531 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 1531 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
1532 if (!this._view) 1532 if (!this._view)
1533 this._view = new WebInspector.AppManifestView(); 1533 this._view = new WebInspector.AppManifestView();
1534 this._storagePanel._innerShowView(this._view); 1534 this._storagePanel._innerShowView(this._view);
1535 return false; 1535 return false;
1536 }, 1536 },
1537 1537
1538 __proto__: WebInspector.BaseStorageTreeElement.prototype 1538 __proto__: WebInspector.BaseStorageTreeElement.prototype
1539 } 1539 };
1540 1540
1541 /** 1541 /**
1542 * @constructor 1542 * @constructor
1543 * @extends {WebInspector.BaseStorageTreeElement} 1543 * @extends {WebInspector.BaseStorageTreeElement}
1544 * @param {!WebInspector.ResourcesPanel} storagePanel 1544 * @param {!WebInspector.ResourcesPanel} storagePanel
1545 */ 1545 */
1546 WebInspector.ClearStorageTreeElement = function(storagePanel) 1546 WebInspector.ClearStorageTreeElement = function(storagePanel)
1547 { 1547 {
1548 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI String("Clear storage"), ["clear-storage-tree-item", "resource-tree-item"], fals e, false); 1548 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI String("Clear storage"), ["clear-storage-tree-item", "resource-tree-item"], fals e, false);
1549 } 1549 };
1550 1550
1551 WebInspector.ClearStorageTreeElement.prototype = { 1551 WebInspector.ClearStorageTreeElement.prototype = {
1552 /** 1552 /**
1553 * @return {string} 1553 * @return {string}
1554 */ 1554 */
1555 get itemURL() 1555 get itemURL()
1556 { 1556 {
1557 return "clear-storage://"; 1557 return "clear-storage://";
1558 }, 1558 },
1559 1559
1560 /** 1560 /**
1561 * @override 1561 * @override
1562 * @return {boolean} 1562 * @return {boolean}
1563 */ 1563 */
1564 onselect: function(selectedByUser) 1564 onselect: function(selectedByUser)
1565 { 1565 {
1566 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 1566 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
1567 if (!this._view) 1567 if (!this._view)
1568 this._view = new WebInspector.ClearStorageView(this._storagePanel); 1568 this._view = new WebInspector.ClearStorageView(this._storagePanel);
1569 this._storagePanel._innerShowView(this._view); 1569 this._storagePanel._innerShowView(this._view);
1570 return false; 1570 return false;
1571 }, 1571 },
1572 1572
1573 __proto__: WebInspector.BaseStorageTreeElement.prototype 1573 __proto__: WebInspector.BaseStorageTreeElement.prototype
1574 } 1574 };
1575 1575
1576 /** 1576 /**
1577 * @constructor 1577 * @constructor
1578 * @extends {WebInspector.StorageCategoryTreeElement} 1578 * @extends {WebInspector.StorageCategoryTreeElement}
1579 * @param {!WebInspector.ResourcesPanel} storagePanel 1579 * @param {!WebInspector.ResourcesPanel} storagePanel
1580 */ 1580 */
1581 WebInspector.IndexedDBTreeElement = function(storagePanel) 1581 WebInspector.IndexedDBTreeElement = function(storagePanel)
1582 { 1582 {
1583 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto r.UIString("IndexedDB"), "IndexedDB", ["database-tree-item", "resource-tree-item "]); 1583 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto r.UIString("IndexedDB"), "IndexedDB", ["database-tree-item", "resource-tree-item "]);
1584 } 1584 };
1585 1585
1586 WebInspector.IndexedDBTreeElement.prototype = { 1586 WebInspector.IndexedDBTreeElement.prototype = {
1587 _initialize: function() 1587 _initialize: function()
1588 { 1588 {
1589 WebInspector.targetManager.addModelListener(WebInspector.IndexedDBModel, WebInspector.IndexedDBModel.Events.DatabaseAdded, this._indexedDBAdded, this); 1589 WebInspector.targetManager.addModelListener(WebInspector.IndexedDBModel, WebInspector.IndexedDBModel.Events.DatabaseAdded, this._indexedDBAdded, this);
1590 WebInspector.targetManager.addModelListener(WebInspector.IndexedDBModel, WebInspector.IndexedDBModel.Events.DatabaseRemoved, this._indexedDBRemoved, thi s); 1590 WebInspector.targetManager.addModelListener(WebInspector.IndexedDBModel, WebInspector.IndexedDBModel.Events.DatabaseRemoved, this._indexedDBRemoved, thi s);
1591 WebInspector.targetManager.addModelListener(WebInspector.IndexedDBModel, WebInspector.IndexedDBModel.Events.DatabaseLoaded, this._indexedDBLoaded, this) ; 1591 WebInspector.targetManager.addModelListener(WebInspector.IndexedDBModel, WebInspector.IndexedDBModel.Events.DatabaseLoaded, this._indexedDBLoaded, this) ;
1592 /** @type {!Array.<!WebInspector.IDBDatabaseTreeElement>} */ 1592 /** @type {!Array.<!WebInspector.IDBDatabaseTreeElement>} */
1593 this._idbDatabaseTreeElements = []; 1593 this._idbDatabaseTreeElements = [];
1594 1594
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 }, 1644 },
1645 1645
1646 /** 1646 /**
1647 * @param {!WebInspector.Event} event 1647 * @param {!WebInspector.Event} event
1648 */ 1648 */
1649 _indexedDBRemoved: function(event) 1649 _indexedDBRemoved: function(event)
1650 { 1650 {
1651 var databaseId = /** @type {!WebInspector.IndexedDBModel.DatabaseId} */ (event.data); 1651 var databaseId = /** @type {!WebInspector.IndexedDBModel.DatabaseId} */ (event.data);
1652 var model = /** @type {!WebInspector.IndexedDBModel} */ (event.target); 1652 var model = /** @type {!WebInspector.IndexedDBModel} */ (event.target);
1653 1653
1654 var idbDatabaseTreeElement = this._idbDatabaseTreeElement(model, databas eId) 1654 var idbDatabaseTreeElement = this._idbDatabaseTreeElement(model, databas eId);
1655 if (!idbDatabaseTreeElement) 1655 if (!idbDatabaseTreeElement)
1656 return; 1656 return;
1657 1657
1658 idbDatabaseTreeElement.clear(); 1658 idbDatabaseTreeElement.clear();
1659 this.removeChild(idbDatabaseTreeElement); 1659 this.removeChild(idbDatabaseTreeElement);
1660 this._idbDatabaseTreeElements.remove(idbDatabaseTreeElement); 1660 this._idbDatabaseTreeElements.remove(idbDatabaseTreeElement);
1661 }, 1661 },
1662 1662
1663 /** 1663 /**
1664 * @param {!WebInspector.Event} event 1664 * @param {!WebInspector.Event} event
(...skipping 23 matching lines...) Expand all
1688 index = i; 1688 index = i;
1689 break; 1689 break;
1690 } 1690 }
1691 } 1691 }
1692 if (index !== -1) 1692 if (index !== -1)
1693 return this._idbDatabaseTreeElements[i]; 1693 return this._idbDatabaseTreeElements[i];
1694 return null; 1694 return null;
1695 }, 1695 },
1696 1696
1697 __proto__: WebInspector.StorageCategoryTreeElement.prototype 1697 __proto__: WebInspector.StorageCategoryTreeElement.prototype
1698 } 1698 };
1699 1699
1700 /** 1700 /**
1701 * @constructor 1701 * @constructor
1702 * @extends {WebInspector.BaseStorageTreeElement} 1702 * @extends {WebInspector.BaseStorageTreeElement}
1703 * @param {!WebInspector.ResourcesPanel} storagePanel 1703 * @param {!WebInspector.ResourcesPanel} storagePanel
1704 * @param {!WebInspector.IndexedDBModel} model 1704 * @param {!WebInspector.IndexedDBModel} model
1705 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId 1705 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId
1706 */ 1706 */
1707 WebInspector.IDBDatabaseTreeElement = function(storagePanel, model, databaseId) 1707 WebInspector.IDBDatabaseTreeElement = function(storagePanel, model, databaseId)
1708 { 1708 {
1709 WebInspector.BaseStorageTreeElement.call(this, storagePanel, databaseId.name + " - " + databaseId.securityOrigin, ["database-tree-item", "resource-tree-item "]); 1709 WebInspector.BaseStorageTreeElement.call(this, storagePanel, databaseId.name + " - " + databaseId.securityOrigin, ["database-tree-item", "resource-tree-item "]);
1710 this._model = model; 1710 this._model = model;
1711 this._databaseId = databaseId; 1711 this._databaseId = databaseId;
1712 this._idbObjectStoreTreeElements = {}; 1712 this._idbObjectStoreTreeElements = {};
1713 } 1713 };
1714 1714
1715 WebInspector.IDBDatabaseTreeElement.prototype = { 1715 WebInspector.IDBDatabaseTreeElement.prototype = {
1716 get itemURL() 1716 get itemURL()
1717 { 1717 {
1718 return "indexedDB://" + this._databaseId.securityOrigin + "/" + this._da tabaseId.name; 1718 return "indexedDB://" + this._databaseId.securityOrigin + "/" + this._da tabaseId.name;
1719 }, 1719 },
1720 1720
1721 onattach: function() 1721 onattach: function()
1722 { 1722 {
1723 WebInspector.BaseStorageTreeElement.prototype.onattach.call(this); 1723 WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 delete this._idbObjectStoreTreeElements[objectStoreName]; 1794 delete this._idbObjectStoreTreeElements[objectStoreName];
1795 }, 1795 },
1796 1796
1797 clear: function() 1797 clear: function()
1798 { 1798 {
1799 for (var objectStoreName in this._idbObjectStoreTreeElements) 1799 for (var objectStoreName in this._idbObjectStoreTreeElements)
1800 this._objectStoreRemoved(objectStoreName); 1800 this._objectStoreRemoved(objectStoreName);
1801 }, 1801 },
1802 1802
1803 __proto__: WebInspector.BaseStorageTreeElement.prototype 1803 __proto__: WebInspector.BaseStorageTreeElement.prototype
1804 } 1804 };
1805 1805
1806 /** 1806 /**
1807 * @constructor 1807 * @constructor
1808 * @extends {WebInspector.BaseStorageTreeElement} 1808 * @extends {WebInspector.BaseStorageTreeElement}
1809 * @param {!WebInspector.ResourcesPanel} storagePanel 1809 * @param {!WebInspector.ResourcesPanel} storagePanel
1810 * @param {!WebInspector.IndexedDBModel} model 1810 * @param {!WebInspector.IndexedDBModel} model
1811 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId 1811 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId
1812 * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore 1812 * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore
1813 */ 1813 */
1814 WebInspector.IDBObjectStoreTreeElement = function(storagePanel, model, databaseI d, objectStore) 1814 WebInspector.IDBObjectStoreTreeElement = function(storagePanel, model, databaseI d, objectStore)
1815 { 1815 {
1816 WebInspector.BaseStorageTreeElement.call(this, storagePanel, objectStore.nam e, ["table-tree-item", "resource-tree-item"]); 1816 WebInspector.BaseStorageTreeElement.call(this, storagePanel, objectStore.nam e, ["table-tree-item", "resource-tree-item"]);
1817 this._model = model; 1817 this._model = model;
1818 this._databaseId = databaseId; 1818 this._databaseId = databaseId;
1819 this._idbIndexTreeElements = {}; 1819 this._idbIndexTreeElements = {};
1820 } 1820 };
1821 1821
1822 WebInspector.IDBObjectStoreTreeElement.prototype = { 1822 WebInspector.IDBObjectStoreTreeElement.prototype = {
1823 get itemURL() 1823 get itemURL()
1824 { 1824 {
1825 return "indexedDB://" + this._databaseId.securityOrigin + "/" + this._da tabaseId.name + "/" + this._objectStore.name; 1825 return "indexedDB://" + this._databaseId.securityOrigin + "/" + this._da tabaseId.name + "/" + this._objectStore.name;
1826 }, 1826 },
1827 1827
1828 onattach: function() 1828 onattach: function()
1829 { 1829 {
1830 WebInspector.BaseStorageTreeElement.prototype.onattach.call(this); 1830 WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 1924
1925 clear: function() 1925 clear: function()
1926 { 1926 {
1927 for (var indexName in this._idbIndexTreeElements) 1927 for (var indexName in this._idbIndexTreeElements)
1928 this._indexRemoved(indexName); 1928 this._indexRemoved(indexName);
1929 if (this._view) 1929 if (this._view)
1930 this._view.clear(); 1930 this._view.clear();
1931 }, 1931 },
1932 1932
1933 __proto__: WebInspector.BaseStorageTreeElement.prototype 1933 __proto__: WebInspector.BaseStorageTreeElement.prototype
1934 } 1934 };
1935 1935
1936 /** 1936 /**
1937 * @constructor 1937 * @constructor
1938 * @extends {WebInspector.BaseStorageTreeElement} 1938 * @extends {WebInspector.BaseStorageTreeElement}
1939 * @param {!WebInspector.ResourcesPanel} storagePanel 1939 * @param {!WebInspector.ResourcesPanel} storagePanel
1940 * @param {!WebInspector.IndexedDBModel} model 1940 * @param {!WebInspector.IndexedDBModel} model
1941 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId 1941 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId
1942 * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore 1942 * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore
1943 * @param {!WebInspector.IndexedDBModel.Index} index 1943 * @param {!WebInspector.IndexedDBModel.Index} index
1944 */ 1944 */
1945 WebInspector.IDBIndexTreeElement = function(storagePanel, model, databaseId, obj ectStore, index) 1945 WebInspector.IDBIndexTreeElement = function(storagePanel, model, databaseId, obj ectStore, index)
1946 { 1946 {
1947 WebInspector.BaseStorageTreeElement.call(this, storagePanel, index.name, ["i ndex-tree-item", "resource-tree-item"]); 1947 WebInspector.BaseStorageTreeElement.call(this, storagePanel, index.name, ["i ndex-tree-item", "resource-tree-item"]);
1948 this._model = model; 1948 this._model = model;
1949 this._databaseId = databaseId; 1949 this._databaseId = databaseId;
1950 this._objectStore = objectStore; 1950 this._objectStore = objectStore;
1951 this._index = index; 1951 this._index = index;
1952 } 1952 };
1953 1953
1954 WebInspector.IDBIndexTreeElement.prototype = { 1954 WebInspector.IDBIndexTreeElement.prototype = {
1955 get itemURL() 1955 get itemURL()
1956 { 1956 {
1957 return "indexedDB://" + this._databaseId.securityOrigin + "/" + this._da tabaseId.name + "/" + this._objectStore.name + "/" + this._index.name; 1957 return "indexedDB://" + this._databaseId.securityOrigin + "/" + this._da tabaseId.name + "/" + this._objectStore.name + "/" + this._index.name;
1958 }, 1958 },
1959 1959
1960 /** 1960 /**
1961 * @param {!WebInspector.IndexedDBModel.Index} index 1961 * @param {!WebInspector.IndexedDBModel.Index} index
1962 */ 1962 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 return false; 1996 return false;
1997 }, 1997 },
1998 1998
1999 clear: function() 1999 clear: function()
2000 { 2000 {
2001 if (this._view) 2001 if (this._view)
2002 this._view.clear(); 2002 this._view.clear();
2003 }, 2003 },
2004 2004
2005 __proto__: WebInspector.BaseStorageTreeElement.prototype 2005 __proto__: WebInspector.BaseStorageTreeElement.prototype
2006 } 2006 };
2007 2007
2008 /** 2008 /**
2009 * @constructor 2009 * @constructor
2010 * @extends {WebInspector.BaseStorageTreeElement} 2010 * @extends {WebInspector.BaseStorageTreeElement}
2011 */ 2011 */
2012 WebInspector.DOMStorageTreeElement = function(storagePanel, domStorage) 2012 WebInspector.DOMStorageTreeElement = function(storagePanel, domStorage)
2013 { 2013 {
2014 WebInspector.BaseStorageTreeElement.call(this, storagePanel, domStorage.secu rityOrigin ? domStorage.securityOrigin : WebInspector.UIString("Local Files"), [ "table-tree-item", "resource-tree-item"]); 2014 WebInspector.BaseStorageTreeElement.call(this, storagePanel, domStorage.secu rityOrigin ? domStorage.securityOrigin : WebInspector.UIString("Local Files"), [ "table-tree-item", "resource-tree-item"]);
2015 this._domStorage = domStorage; 2015 this._domStorage = domStorage;
2016 } 2016 };
2017 2017
2018 WebInspector.DOMStorageTreeElement.prototype = { 2018 WebInspector.DOMStorageTreeElement.prototype = {
2019 get itemURL() 2019 get itemURL()
2020 { 2020 {
2021 return "storage://" + this._domStorage.securityOrigin + "/" + (this._dom Storage.isLocalStorage ? "local" : "session"); 2021 return "storage://" + this._domStorage.securityOrigin + "/" + (this._dom Storage.isLocalStorage ? "local" : "session");
2022 }, 2022 },
2023 2023
2024 /** 2024 /**
2025 * @override 2025 * @override
2026 * @return {boolean} 2026 * @return {boolean}
2027 */ 2027 */
2028 onselect: function(selectedByUser) 2028 onselect: function(selectedByUser)
2029 { 2029 {
2030 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 2030 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
2031 this._storagePanel._showDOMStorage(this._domStorage); 2031 this._storagePanel._showDOMStorage(this._domStorage);
2032 return false; 2032 return false;
2033 }, 2033 },
2034 2034
2035 __proto__: WebInspector.BaseStorageTreeElement.prototype 2035 __proto__: WebInspector.BaseStorageTreeElement.prototype
2036 } 2036 };
2037 2037
2038 /** 2038 /**
2039 * @constructor 2039 * @constructor
2040 * @extends {WebInspector.BaseStorageTreeElement} 2040 * @extends {WebInspector.BaseStorageTreeElement}
2041 */ 2041 */
2042 WebInspector.CookieTreeElement = function(storagePanel, cookieDomain) 2042 WebInspector.CookieTreeElement = function(storagePanel, cookieDomain)
2043 { 2043 {
2044 WebInspector.BaseStorageTreeElement.call(this, storagePanel, cookieDomain ? cookieDomain : WebInspector.UIString("Local Files"), ["cookie-tree-item", "resou rce-tree-item"]); 2044 WebInspector.BaseStorageTreeElement.call(this, storagePanel, cookieDomain ? cookieDomain : WebInspector.UIString("Local Files"), ["cookie-tree-item", "resou rce-tree-item"]);
2045 this._cookieDomain = cookieDomain; 2045 this._cookieDomain = cookieDomain;
2046 } 2046 };
2047 2047
2048 WebInspector.CookieTreeElement.prototype = { 2048 WebInspector.CookieTreeElement.prototype = {
2049 get itemURL() 2049 get itemURL()
2050 { 2050 {
2051 return "cookies://" + this._cookieDomain; 2051 return "cookies://" + this._cookieDomain;
2052 }, 2052 },
2053 2053
2054 onattach: function() 2054 onattach: function()
2055 { 2055 {
2056 WebInspector.BaseStorageTreeElement.prototype.onattach.call(this); 2056 WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);
(...skipping 23 matching lines...) Expand all
2080 * @return {boolean} 2080 * @return {boolean}
2081 */ 2081 */
2082 onselect: function(selectedByUser) 2082 onselect: function(selectedByUser)
2083 { 2083 {
2084 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 2084 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
2085 this._storagePanel.showCookies(this, this._cookieDomain); 2085 this._storagePanel.showCookies(this, this._cookieDomain);
2086 return false; 2086 return false;
2087 }, 2087 },
2088 2088
2089 __proto__: WebInspector.BaseStorageTreeElement.prototype 2089 __proto__: WebInspector.BaseStorageTreeElement.prototype
2090 } 2090 };
2091 2091
2092 /** 2092 /**
2093 * @constructor 2093 * @constructor
2094 * @extends {WebInspector.BaseStorageTreeElement} 2094 * @extends {WebInspector.BaseStorageTreeElement}
2095 */ 2095 */
2096 WebInspector.ApplicationCacheManifestTreeElement = function(storagePanel, manife stURL) 2096 WebInspector.ApplicationCacheManifestTreeElement = function(storagePanel, manife stURL)
2097 { 2097 {
2098 var title = new WebInspector.ParsedURL(manifestURL).displayName; 2098 var title = new WebInspector.ParsedURL(manifestURL).displayName;
2099 WebInspector.BaseStorageTreeElement.call(this, storagePanel, title, ["applic ation-cache-storage-tree-item"]); 2099 WebInspector.BaseStorageTreeElement.call(this, storagePanel, title, ["applic ation-cache-storage-tree-item"]);
2100 this.tooltip = manifestURL; 2100 this.tooltip = manifestURL;
2101 this._manifestURL = manifestURL; 2101 this._manifestURL = manifestURL;
2102 } 2102 };
2103 2103
2104 WebInspector.ApplicationCacheManifestTreeElement.prototype = { 2104 WebInspector.ApplicationCacheManifestTreeElement.prototype = {
2105 get itemURL() 2105 get itemURL()
2106 { 2106 {
2107 return "appcache://" + this._manifestURL; 2107 return "appcache://" + this._manifestURL;
2108 }, 2108 },
2109 2109
2110 get manifestURL() 2110 get manifestURL()
2111 { 2111 {
2112 return this._manifestURL; 2112 return this._manifestURL;
2113 }, 2113 },
2114 2114
2115 /** 2115 /**
2116 * @override 2116 * @override
2117 * @return {boolean} 2117 * @return {boolean}
2118 */ 2118 */
2119 onselect: function(selectedByUser) 2119 onselect: function(selectedByUser)
2120 { 2120 {
2121 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 2121 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
2122 this._storagePanel.showCategoryView(this._manifestURL); 2122 this._storagePanel.showCategoryView(this._manifestURL);
2123 return false; 2123 return false;
2124 }, 2124 },
2125 2125
2126 __proto__: WebInspector.BaseStorageTreeElement.prototype 2126 __proto__: WebInspector.BaseStorageTreeElement.prototype
2127 } 2127 };
2128 2128
2129 /** 2129 /**
2130 * @constructor 2130 * @constructor
2131 * @extends {WebInspector.BaseStorageTreeElement} 2131 * @extends {WebInspector.BaseStorageTreeElement}
2132 * @param {!WebInspector.ResourcesPanel} storagePanel 2132 * @param {!WebInspector.ResourcesPanel} storagePanel
2133 * @param {!PageAgent.FrameId} frameId 2133 * @param {!PageAgent.FrameId} frameId
2134 * @param {string} manifestURL 2134 * @param {string} manifestURL
2135 */ 2135 */
2136 WebInspector.ApplicationCacheFrameTreeElement = function(storagePanel, frameId, manifestURL) 2136 WebInspector.ApplicationCacheFrameTreeElement = function(storagePanel, frameId, manifestURL)
2137 { 2137 {
2138 WebInspector.BaseStorageTreeElement.call(this, storagePanel, "", ["navigator -tree-item", "navigator-folder-tree-item"]); 2138 WebInspector.BaseStorageTreeElement.call(this, storagePanel, "", ["navigator -tree-item", "navigator-folder-tree-item"]);
2139 this._frameId = frameId; 2139 this._frameId = frameId;
2140 this._manifestURL = manifestURL; 2140 this._manifestURL = manifestURL;
2141 this._refreshTitles(); 2141 this._refreshTitles();
2142 } 2142 };
2143 2143
2144 WebInspector.ApplicationCacheFrameTreeElement.prototype = { 2144 WebInspector.ApplicationCacheFrameTreeElement.prototype = {
2145 get itemURL() 2145 get itemURL()
2146 { 2146 {
2147 return "appcache://" + this._manifestURL + "/" + encodeURI(this.titleAsT ext()); 2147 return "appcache://" + this._manifestURL + "/" + encodeURI(this.titleAsT ext());
2148 }, 2148 },
2149 2149
2150 get frameId() 2150 get frameId()
2151 { 2151 {
2152 return this._frameId; 2152 return this._frameId;
(...skipping 21 matching lines...) Expand all
2174 * @return {boolean} 2174 * @return {boolean}
2175 */ 2175 */
2176 onselect: function(selectedByUser) 2176 onselect: function(selectedByUser)
2177 { 2177 {
2178 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser); 2178 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select edByUser);
2179 this._storagePanel.showApplicationCache(this._frameId); 2179 this._storagePanel.showApplicationCache(this._frameId);
2180 return false; 2180 return false;
2181 }, 2181 },
2182 2182
2183 __proto__: WebInspector.BaseStorageTreeElement.prototype 2183 __proto__: WebInspector.BaseStorageTreeElement.prototype
2184 } 2184 };
2185 2185
2186 /** 2186 /**
2187 * @constructor 2187 * @constructor
2188 * @extends {WebInspector.VBox} 2188 * @extends {WebInspector.VBox}
2189 */ 2189 */
2190 WebInspector.StorageCategoryView = function() 2190 WebInspector.StorageCategoryView = function()
2191 { 2191 {
2192 WebInspector.VBox.call(this); 2192 WebInspector.VBox.call(this);
2193 2193
2194 this.element.classList.add("storage-view"); 2194 this.element.classList.add("storage-view");
2195 this._emptyWidget = new WebInspector.EmptyWidget(""); 2195 this._emptyWidget = new WebInspector.EmptyWidget("");
2196 this._emptyWidget.show(this.element); 2196 this._emptyWidget.show(this.element);
2197 } 2197 };
2198 2198
2199 WebInspector.StorageCategoryView.prototype = { 2199 WebInspector.StorageCategoryView.prototype = {
2200 setText: function(text) 2200 setText: function(text)
2201 { 2201 {
2202 this._emptyWidget.text = text; 2202 this._emptyWidget.text = text;
2203 }, 2203 },
2204 2204
2205 __proto__: WebInspector.VBox.prototype 2205 __proto__: WebInspector.VBox.prototype
2206 } 2206 };
2207 2207
2208 /** 2208 /**
2209 * @return {!WebInspector.ResourcesPanel} 2209 * @return {!WebInspector.ResourcesPanel}
2210 */ 2210 */
2211 WebInspector.ResourcesPanel._instance = function() 2211 WebInspector.ResourcesPanel._instance = function()
2212 { 2212 {
2213 return /** @type {!WebInspector.ResourcesPanel} */ (self.runtime.sharedInsta nce(WebInspector.ResourcesPanel)); 2213 return /** @type {!WebInspector.ResourcesPanel} */ (self.runtime.sharedInsta nce(WebInspector.ResourcesPanel));
2214 } 2214 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698