| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 this._manifestTreeElement = new WebInspector.AppManifestTreeElement(this); | 51 this._manifestTreeElement = new WebInspector.AppManifestTreeElement(this); |
| 52 this._applicationTreeElement.appendChild(this._manifestTreeElement); | 52 this._applicationTreeElement.appendChild(this._manifestTreeElement); |
| 53 this.serviceWorkersTreeElement = new WebInspector.ServiceWorkersTreeElement(
this); |
| 54 this._applicationTreeElement.appendChild(this.serviceWorkersTreeElement); |
| 55 var clearStorageTreeElement = new WebInspector.ClearStorageTreeElement(this)
; |
| 56 this._applicationTreeElement.appendChild(clearStorageTreeElement); |
| 53 | 57 |
| 54 var storageTreeElement = this._addSidebarSection(WebInspector.UIString("Stor
age")); | 58 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"]); | 59 this.localStorageListTreeElement = new WebInspector.StorageCategoryTreeEleme
nt(this, WebInspector.UIString("Local Storage"), "LocalStorage", ["domstorage-st
orage-tree-item", "local-storage"]); |
| 56 storageTreeElement.appendChild(this.localStorageListTreeElement); | 60 storageTreeElement.appendChild(this.localStorageListTreeElement); |
| 57 this.sessionStorageListTreeElement = new WebInspector.StorageCategoryTreeEle
ment(this, WebInspector.UIString("Session Storage"), "SessionStorage", ["domstor
age-storage-tree-item", "session-storage"]); | 61 this.sessionStorageListTreeElement = new WebInspector.StorageCategoryTreeEle
ment(this, WebInspector.UIString("Session Storage"), "SessionStorage", ["domstor
age-storage-tree-item", "session-storage"]); |
| 58 storageTreeElement.appendChild(this.sessionStorageListTreeElement); | 62 storageTreeElement.appendChild(this.sessionStorageListTreeElement); |
| 59 this.indexedDBListTreeElement = new WebInspector.IndexedDBTreeElement(this); | 63 this.indexedDBListTreeElement = new WebInspector.IndexedDBTreeElement(this); |
| 60 storageTreeElement.appendChild(this.indexedDBListTreeElement); | 64 storageTreeElement.appendChild(this.indexedDBListTreeElement); |
| 61 this.databasesListTreeElement = new WebInspector.StorageCategoryTreeElement(
this, WebInspector.UIString("Web SQL"), "Databases", ["database-storage-tree-ite
m"]); | 65 this.databasesListTreeElement = new WebInspector.StorageCategoryTreeElement(
this, WebInspector.UIString("Web SQL"), "Databases", ["database-storage-tree-ite
m"]); |
| 62 storageTreeElement.appendChild(this.databasesListTreeElement); | 66 storageTreeElement.appendChild(this.databasesListTreeElement); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 124 |
| 121 /** | 125 /** |
| 122 * @override | 126 * @override |
| 123 * @param {!WebInspector.Target} target | 127 * @param {!WebInspector.Target} target |
| 124 */ | 128 */ |
| 125 targetAdded: function(target) | 129 targetAdded: function(target) |
| 126 { | 130 { |
| 127 if (this._target) | 131 if (this._target) |
| 128 return; | 132 return; |
| 129 this._target = target; | 133 this._target = target; |
| 130 | |
| 131 if (target.serviceWorkerManager) { | |
| 132 this.serviceWorkersTreeElement = new WebInspector.ServiceWorkersTree
Element(this); | |
| 133 this._applicationTreeElement.appendChild(this.serviceWorkersTreeElem
ent); | |
| 134 } | |
| 135 | |
| 136 this._databaseModel = WebInspector.DatabaseModel.fromTarget(target); | 134 this._databaseModel = WebInspector.DatabaseModel.fromTarget(target); |
| 137 this._domStorageModel = WebInspector.DOMStorageModel.fromTarget(target); | 135 this._domStorageModel = WebInspector.DOMStorageModel.fromTarget(target); |
| 138 | 136 |
| 139 if (target.resourceTreeModel.cachedResourcesLoaded()) | 137 if (target.resourceTreeModel.cachedResourcesLoaded()) |
| 140 this._initialize(); | 138 this._initialize(); |
| 141 | 139 |
| 142 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel
.EventTypes.Load, this._loadEventFired, this); | 140 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel
.EventTypes.Load, this._loadEventFired, this); |
| 143 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel
.EventTypes.CachedResourcesLoaded, this._initialize, this); | 141 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel
.EventTypes.CachedResourcesLoaded, this._initialize, this); |
| 144 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel
.EventTypes.WillLoadCachedResources, this._resetWithFrames, this); | 142 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel
.EventTypes.WillLoadCachedResources, this._resetWithFrames, this); |
| 145 this._databaseModel.addEventListener(WebInspector.DatabaseModel.Events.D
atabaseAdded, this._databaseAdded, this); | 143 this._databaseModel.addEventListener(WebInspector.DatabaseModel.Events.D
atabaseAdded, this._databaseAdded, this); |
| 144 this._databaseModel.addEventListener(WebInspector.DatabaseModel.Events.D
atabasesRemoved, this._resetWebSQL, this); |
| 146 }, | 145 }, |
| 147 | 146 |
| 148 /** | 147 /** |
| 149 * @override | 148 * @override |
| 150 * @param {!WebInspector.Target} target | 149 * @param {!WebInspector.Target} target |
| 151 */ | 150 */ |
| 152 targetRemoved: function(target) | 151 targetRemoved: function(target) |
| 153 { | 152 { |
| 154 if (target !== this._target) | 153 if (target !== this._target) |
| 155 return; | 154 return; |
| 156 delete this._target; | 155 delete this._target; |
| 157 | 156 |
| 158 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.Load, this._loadEventFired, this); | 157 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.Load, this._loadEventFired, this); |
| 159 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.CachedResourcesLoaded, this._initialize, this); | 158 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.CachedResourcesLoaded, this._initialize, this); |
| 160 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.WillLoadCachedResources, this._resetWithFrames, this); | 159 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.WillLoadCachedResources, this._resetWithFrames, this); |
| 161 this._databaseModel.removeEventListener(WebInspector.DatabaseModel.Event
s.DatabaseAdded, this._databaseAdded, this); | 160 this._databaseModel.removeEventListener(WebInspector.DatabaseModel.Event
s.DatabaseAdded, this._databaseAdded, this); |
| 161 this._databaseModel.removeEventListener(WebInspector.DatabaseModel.Event
s.DatabasesRemoved, this._resetWebSQL, this); |
| 162 | 162 |
| 163 this._resetWithFrames(); | 163 this._resetWithFrames(); |
| 164 }, | 164 }, |
| 165 | 165 |
| 166 _initialize: function() | 166 _initialize: function() |
| 167 { | 167 { |
| 168 this._databaseModel.enable(); | 168 this._databaseModel.enable(); |
| 169 this._domStorageModel.enable(); | 169 this._domStorageModel.enable(); |
| 170 var indexedDBModel = WebInspector.IndexedDBModel.fromTarget(this._target
); | 170 var indexedDBModel = WebInspector.IndexedDBModel.fromTarget(this._target
); |
| 171 if (indexedDBModel) | 171 if (indexedDBModel) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 this.showResource(mainResource); | 213 this.showResource(mainResource); |
| 214 }, | 214 }, |
| 215 | 215 |
| 216 _resetWithFrames: function() | 216 _resetWithFrames: function() |
| 217 { | 217 { |
| 218 this.resourcesListTreeElement.removeChildren(); | 218 this.resourcesListTreeElement.removeChildren(); |
| 219 this._treeElementForFrameId = {}; | 219 this._treeElementForFrameId = {}; |
| 220 this._reset(); | 220 this._reset(); |
| 221 }, | 221 }, |
| 222 | 222 |
| 223 _reset: function() | 223 _resetWebSQL: function() |
| 224 { | 224 { |
| 225 this._domains = {}; | 225 if (this.visibleView instanceof WebInspector.DatabaseQueryView || this.v
isibleView instanceof WebInspector.DatabaseTableView) { |
| 226 this.visibleView.detach(); |
| 227 delete this.visibleView; |
| 228 } |
| 229 |
| 226 var queryViews = this._databaseQueryViews.valuesArray(); | 230 var queryViews = this._databaseQueryViews.valuesArray(); |
| 227 for (var i = 0; i < queryViews.length; ++i) | 231 for (var i = 0; i < queryViews.length; ++i) |
| 228 queryViews[i].removeEventListener(WebInspector.DatabaseQueryView.Eve
nts.SchemaUpdated, this._updateDatabaseTables, this); | 232 queryViews[i].removeEventListener(WebInspector.DatabaseQueryView.Eve
nts.SchemaUpdated, this._updateDatabaseTables, this); |
| 229 this._databaseTableViews.clear(); | 233 this._databaseTableViews.clear(); |
| 230 this._databaseQueryViews.clear(); | 234 this._databaseQueryViews.clear(); |
| 231 this._databaseTreeElements.clear(); | 235 this._databaseTreeElements.clear(); |
| 232 this._domStorageViews.clear(); | 236 this.databasesListTreeElement.removeChildren(); |
| 233 this._domStorageTreeElements.clear(); | 237 this.databasesListTreeElement.setExpandable(false); |
| 234 this._cookieViews = {}; | 238 }, |
| 235 | 239 |
| 236 this.databasesListTreeElement.removeChildren(); | 240 _resetDOMStorage: function() |
| 237 this.localStorageListTreeElement.removeChildren(); | 241 { |
| 238 this.sessionStorageListTreeElement.removeChildren(); | 242 if (this.visibleView instanceof WebInspector.DOMStorageItemsView) { |
| 239 this.cookieListTreeElement.removeChildren(); | |
| 240 this.cacheStorageListTreeElement.removeChildren(); | |
| 241 | |
| 242 if (this.visibleView && !(this.visibleView instanceof WebInspector.Stora
geCategoryView) | |
| 243 && !(this.visibleView instanceof WebInspector.ServiceWorkersView) | |
| 244 && !(this.visibleView instanceof WebInspector.AppManifestView)) { | |
| 245 this.visibleView.detach(); | 243 this.visibleView.detach(); |
| 246 delete this.visibleView; | 244 delete this.visibleView; |
| 247 } | 245 } |
| 246 |
| 247 this._domStorageViews.clear(); |
| 248 this._domStorageTreeElements.clear(); |
| 249 this.localStorageListTreeElement.removeChildren(); |
| 250 this.sessionStorageListTreeElement.removeChildren(); |
| 251 }, |
| 252 |
| 253 _resetCookies: function() |
| 254 { |
| 255 if (this.visibleView instanceof WebInspector.CookieItemsView) { |
| 256 this.visibleView.detach(); |
| 257 delete this.visibleView; |
| 258 } |
| 259 this._cookieViews = {}; |
| 260 this.cookieListTreeElement.removeChildren(); |
| 261 }, |
| 262 |
| 263 _resetCacheStorage: function() |
| 264 { |
| 265 if (this.visibleView instanceof WebInspector.ServiceWorkerCacheView) { |
| 266 this.visibleView.detach(); |
| 267 delete this.visibleView; |
| 268 } |
| 269 this.cacheStorageListTreeElement.removeChildren(); |
| 270 this.cacheStorageListTreeElement.setExpandable(false); |
| 271 }, |
| 272 |
| 273 _resetAppCache: function() |
| 274 { |
| 275 for (var frameId of Object.keys(this._applicationCacheFrameElements)) |
| 276 this._applicationCacheFrameManifestRemoved({data: frameId}); |
| 277 this.applicationCacheListTreeElement.setExpandable(false); |
| 278 }, |
| 279 |
| 280 _reset: function() |
| 281 { |
| 282 this._domains = {}; |
| 283 this._resetWebSQL(); |
| 284 this._resetDOMStorage(); |
| 285 this._resetCookies(); |
| 286 this._resetCacheStorage(); |
| 287 // No need to this._resetAppCache. |
| 288 |
| 289 if ((this.visibleView instanceof WebInspector.ResourceSourceFrame) |
| 290 || (this.visibleView instanceof WebInspector.ImageView) |
| 291 || (this.visibleView instanceof WebInspector.FontView)) { |
| 292 this.visibleView.detach(); |
| 293 delete this.visibleView; |
| 294 } |
| 248 | 295 |
| 249 this._storageViewToolbar.removeToolbarItems(); | 296 this._storageViewToolbar.removeToolbarItems(); |
| 250 | 297 |
| 251 if (this._sidebarTree.selectedTreeElement) | 298 if (this._sidebarTree.selectedTreeElement) |
| 252 this._sidebarTree.selectedTreeElement.deselect(); | 299 this._sidebarTree.selectedTreeElement.deselect(); |
| 253 }, | 300 }, |
| 254 | 301 |
| 255 _populateResourceTree: function() | 302 _populateResourceTree: function() |
| 256 { | 303 { |
| 257 this._treeElementForFrameId = {}; | 304 this._treeElementForFrameId = {}; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 408 |
| 362 addDocumentURL: function(url) | 409 addDocumentURL: function(url) |
| 363 { | 410 { |
| 364 var parsedURL = url.asParsedURL(); | 411 var parsedURL = url.asParsedURL(); |
| 365 if (!parsedURL) | 412 if (!parsedURL) |
| 366 return; | 413 return; |
| 367 | 414 |
| 368 var domain = parsedURL.securityOrigin(); | 415 var domain = parsedURL.securityOrigin(); |
| 369 if (!this._domains[domain]) { | 416 if (!this._domains[domain]) { |
| 370 this._domains[domain] = true; | 417 this._domains[domain] = true; |
| 371 | |
| 372 var cookieDomainTreeElement = new WebInspector.CookieTreeElement(thi
s, domain); | 418 var cookieDomainTreeElement = new WebInspector.CookieTreeElement(thi
s, domain); |
| 373 this.cookieListTreeElement.appendChild(cookieDomainTreeElement); | 419 this.cookieListTreeElement.appendChild(cookieDomainTreeElement); |
| 374 } | 420 } |
| 375 }, | 421 }, |
| 376 | 422 |
| 377 /** | 423 /** |
| 378 * @param {!WebInspector.Event} event | 424 * @param {!WebInspector.Event} event |
| 379 */ | 425 */ |
| 380 _domStorageAdded: function(event) | 426 _domStorageAdded: function(event) |
| 381 { | 427 { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 } | 621 } |
| 576 | 622 |
| 577 this._innerShowView(view); | 623 this._innerShowView(view); |
| 578 }, | 624 }, |
| 579 | 625 |
| 580 /** | 626 /** |
| 581 * @param {string} cookieDomain | 627 * @param {string} cookieDomain |
| 582 */ | 628 */ |
| 583 clearCookies: function(cookieDomain) | 629 clearCookies: function(cookieDomain) |
| 584 { | 630 { |
| 585 this._cookieViews[cookieDomain].clear(); | 631 if (this._cookieViews[cookieDomain]) |
| 632 this._cookieViews[cookieDomain].clear(); |
| 586 }, | 633 }, |
| 587 | 634 |
| 588 showApplicationCache: function(frameId) | 635 showApplicationCache: function(frameId) |
| 589 { | 636 { |
| 590 if (!this._applicationCacheViews[frameId]) | 637 if (!this._applicationCacheViews[frameId]) |
| 591 this._applicationCacheViews[frameId] = new WebInspector.ApplicationC
acheItemsView(this._applicationCacheModel, frameId); | 638 this._applicationCacheViews[frameId] = new WebInspector.ApplicationC
acheItemsView(this._applicationCacheModel, frameId); |
| 592 | 639 |
| 593 this._innerShowView(this._applicationCacheViews[frameId]); | 640 this._innerShowView(this._applicationCacheViews[frameId]); |
| 594 }, | 641 }, |
| 595 | 642 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 _populateApplicationCacheTree: function() | 727 _populateApplicationCacheTree: function() |
| 681 { | 728 { |
| 682 this._applicationCacheModel = new WebInspector.ApplicationCacheModel(thi
s._target); | 729 this._applicationCacheModel = new WebInspector.ApplicationCacheModel(thi
s._target); |
| 683 | 730 |
| 684 this._applicationCacheViews = {}; | 731 this._applicationCacheViews = {}; |
| 685 this._applicationCacheFrameElements = {}; | 732 this._applicationCacheFrameElements = {}; |
| 686 this._applicationCacheManifestElements = {}; | 733 this._applicationCacheManifestElements = {}; |
| 687 | 734 |
| 688 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestAdded, this._applicationCacheFrameManifestAdded,
this); | 735 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestAdded, this._applicationCacheFrameManifestAdded,
this); |
| 689 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestRemoved, this._applicationCacheFrameManifestRemo
ved, this); | 736 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestRemoved, this._applicationCacheFrameManifestRemo
ved, this); |
| 737 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestsReset, this._resetAppCache, this); |
| 690 | 738 |
| 691 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestStatusUpdated, this._applicationCacheFrameManife
stStatusChanged, this); | 739 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.FrameManifestStatusUpdated, this._applicationCacheFrameManife
stStatusChanged, this); |
| 692 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.NetworkStateChanged, this._applicationCacheNetworkStateChange
d, this); | 740 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac
heModel.EventTypes.NetworkStateChanged, this._applicationCacheNetworkStateChange
d, this); |
| 693 }, | 741 }, |
| 694 | 742 |
| 695 _applicationCacheFrameManifestAdded: function(event) | 743 _applicationCacheFrameManifestAdded: function(event) |
| 696 { | 744 { |
| 697 var frameId = event.data; | 745 var frameId = event.data; |
| 698 var manifestURL = this._applicationCacheModel.frameManifestURL(frameId); | 746 var manifestURL = this._applicationCacheModel.frameManifestURL(frameId); |
| 699 | 747 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 } | 1467 } |
| 1420 | 1468 |
| 1421 | 1469 |
| 1422 /** | 1470 /** |
| 1423 * @constructor | 1471 * @constructor |
| 1424 * @extends {WebInspector.BaseStorageTreeElement} | 1472 * @extends {WebInspector.BaseStorageTreeElement} |
| 1425 * @param {!WebInspector.ResourcesPanel} storagePanel | 1473 * @param {!WebInspector.ResourcesPanel} storagePanel |
| 1426 */ | 1474 */ |
| 1427 WebInspector.ServiceWorkersTreeElement = function(storagePanel) | 1475 WebInspector.ServiceWorkersTreeElement = function(storagePanel) |
| 1428 { | 1476 { |
| 1429 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI
String("Service Workers"), ["service-workers-tree-item"], false); | 1477 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI
String("Service Workers"), [], false, true); |
| 1430 } | 1478 } |
| 1431 | 1479 |
| 1432 WebInspector.ServiceWorkersTreeElement.prototype = { | 1480 WebInspector.ServiceWorkersTreeElement.prototype = { |
| 1433 /** | 1481 /** |
| 1434 * @return {string} | 1482 * @return {string} |
| 1435 */ | 1483 */ |
| 1436 get itemURL() | 1484 get itemURL() |
| 1437 { | 1485 { |
| 1438 return "service-workers://"; | 1486 return "service-workers://"; |
| 1439 }, | 1487 }, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1454 __proto__: WebInspector.BaseStorageTreeElement.prototype | 1502 __proto__: WebInspector.BaseStorageTreeElement.prototype |
| 1455 } | 1503 } |
| 1456 | 1504 |
| 1457 /** | 1505 /** |
| 1458 * @constructor | 1506 * @constructor |
| 1459 * @extends {WebInspector.BaseStorageTreeElement} | 1507 * @extends {WebInspector.BaseStorageTreeElement} |
| 1460 * @param {!WebInspector.ResourcesPanel} storagePanel | 1508 * @param {!WebInspector.ResourcesPanel} storagePanel |
| 1461 */ | 1509 */ |
| 1462 WebInspector.AppManifestTreeElement = function(storagePanel) | 1510 WebInspector.AppManifestTreeElement = function(storagePanel) |
| 1463 { | 1511 { |
| 1464 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI
String("Manifest"), [], false); | 1512 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI
String("Manifest"), [], false, true); |
| 1465 } | 1513 } |
| 1466 | 1514 |
| 1467 WebInspector.AppManifestTreeElement.prototype = { | 1515 WebInspector.AppManifestTreeElement.prototype = { |
| 1468 /** | 1516 /** |
| 1469 * @return {string} | 1517 * @return {string} |
| 1470 */ | 1518 */ |
| 1471 get itemURL() | 1519 get itemURL() |
| 1472 { | 1520 { |
| 1473 return "manifest://"; | 1521 return "manifest://"; |
| 1474 }, | 1522 }, |
| 1475 | 1523 |
| 1476 /** | 1524 /** |
| 1477 * @override | 1525 * @override |
| 1478 * @return {boolean} | 1526 * @return {boolean} |
| 1479 */ | 1527 */ |
| 1480 onselect: function(selectedByUser) | 1528 onselect: function(selectedByUser) |
| 1481 { | 1529 { |
| 1482 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select
edByUser); | 1530 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select
edByUser); |
| 1483 if (!this._view) | 1531 if (!this._view) |
| 1484 this._view = new WebInspector.AppManifestView(); | 1532 this._view = new WebInspector.AppManifestView(); |
| 1485 this._storagePanel._innerShowView(this._view); | 1533 this._storagePanel._innerShowView(this._view); |
| 1486 return false; | 1534 return false; |
| 1487 }, | 1535 }, |
| 1488 | 1536 |
| 1489 __proto__: WebInspector.BaseStorageTreeElement.prototype | 1537 __proto__: WebInspector.BaseStorageTreeElement.prototype |
| 1490 } | 1538 } |
| 1491 | 1539 |
| 1492 /** | 1540 /** |
| 1493 * @constructor | 1541 * @constructor |
| 1542 * @extends {WebInspector.BaseStorageTreeElement} |
| 1543 * @param {!WebInspector.ResourcesPanel} storagePanel |
| 1544 */ |
| 1545 WebInspector.ClearStorageTreeElement = function(storagePanel) |
| 1546 { |
| 1547 WebInspector.BaseStorageTreeElement.call(this, storagePanel, WebInspector.UI
String("Clear storage"), [], false, true); |
| 1548 } |
| 1549 |
| 1550 WebInspector.ClearStorageTreeElement.prototype = { |
| 1551 /** |
| 1552 * @return {string} |
| 1553 */ |
| 1554 get itemURL() |
| 1555 { |
| 1556 return "clear-storage://"; |
| 1557 }, |
| 1558 |
| 1559 /** |
| 1560 * @override |
| 1561 * @return {boolean} |
| 1562 */ |
| 1563 onselect: function(selectedByUser) |
| 1564 { |
| 1565 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, select
edByUser); |
| 1566 if (!this._view) |
| 1567 this._view = new WebInspector.ClearStorageView(this._storagePanel); |
| 1568 this._storagePanel._innerShowView(this._view); |
| 1569 return false; |
| 1570 }, |
| 1571 |
| 1572 __proto__: WebInspector.BaseStorageTreeElement.prototype |
| 1573 } |
| 1574 |
| 1575 /** |
| 1576 * @constructor |
| 1494 * @extends {WebInspector.StorageCategoryTreeElement} | 1577 * @extends {WebInspector.StorageCategoryTreeElement} |
| 1495 * @param {!WebInspector.ResourcesPanel} storagePanel | 1578 * @param {!WebInspector.ResourcesPanel} storagePanel |
| 1496 */ | 1579 */ |
| 1497 WebInspector.IndexedDBTreeElement = function(storagePanel) | 1580 WebInspector.IndexedDBTreeElement = function(storagePanel) |
| 1498 { | 1581 { |
| 1499 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto
r.UIString("IndexedDB"), "IndexedDB", ["indexed-db-storage-tree-item"]); | 1582 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto
r.UIString("IndexedDB"), "IndexedDB", ["indexed-db-storage-tree-item"]); |
| 1500 } | 1583 } |
| 1501 | 1584 |
| 1502 WebInspector.IndexedDBTreeElement.prototype = { | 1585 WebInspector.IndexedDBTreeElement.prototype = { |
| 1503 _initialize: function() | 1586 _initialize: function() |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2154 WebInspector.ResourcesPanelFactory.prototype = { | 2237 WebInspector.ResourcesPanelFactory.prototype = { |
| 2155 /** | 2238 /** |
| 2156 * @override | 2239 * @override |
| 2157 * @return {!WebInspector.Panel} | 2240 * @return {!WebInspector.Panel} |
| 2158 */ | 2241 */ |
| 2159 createPanel: function() | 2242 createPanel: function() |
| 2160 { | 2243 { |
| 2161 return WebInspector.ResourcesPanel._instance(); | 2244 return WebInspector.ResourcesPanel._instance(); |
| 2162 } | 2245 } |
| 2163 } | 2246 } |
| OLD | NEW |