| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 WebInspector.Panel.prototype.wasShown.call(this); | 134 WebInspector.Panel.prototype.wasShown.call(this); |
| 135 this._initialize(); | 135 this._initialize(); |
| 136 }, | 136 }, |
| 137 | 137 |
| 138 _initialize: function() | 138 _initialize: function() |
| 139 { | 139 { |
| 140 if (!this._initialized && this.isShowing() && this._cachedResourcesWereL
oaded) { | 140 if (!this._initialized && this.isShowing() && this._cachedResourcesWereL
oaded) { |
| 141 this._populateResourceTree(); | 141 this._populateResourceTree(); |
| 142 this._populateDOMStorageTree(); | 142 this._populateDOMStorageTree(); |
| 143 this._populateApplicationCacheTree(); | 143 this._populateApplicationCacheTree(); |
| 144 this.indexedDBListTreeElement._initialize(); |
| 145 if (WebInspector.experimentsSettings.fileSystemInspection.isEnabled(
)) |
| 146 this.fileSystemListTreeElement._initialize(); |
| 144 this._initDefaultSelection(); | 147 this._initDefaultSelection(); |
| 145 this._initialized = true; | 148 this._initialized = true; |
| 146 } | 149 } |
| 147 }, | 150 }, |
| 148 | 151 |
| 149 _loadEventFired: function() | 152 _loadEventFired: function() |
| 150 { | 153 { |
| 151 this._initDefaultSelection(); | 154 this._initDefaultSelection(); |
| 152 }, | 155 }, |
| 153 | 156 |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 __proto__: TreeElement.prototype | 1072 __proto__: TreeElement.prototype |
| 1070 } | 1073 } |
| 1071 | 1074 |
| 1072 /** | 1075 /** |
| 1073 * @constructor | 1076 * @constructor |
| 1074 * @extends {WebInspector.BaseStorageTreeElement} | 1077 * @extends {WebInspector.BaseStorageTreeElement} |
| 1075 * @param {boolean=} noIcon | 1078 * @param {boolean=} noIcon |
| 1076 */ | 1079 */ |
| 1077 WebInspector.StorageCategoryTreeElement = function(storagePanel, categoryName, s
ettingsKey, iconClasses, noIcon) | 1080 WebInspector.StorageCategoryTreeElement = function(storagePanel, categoryName, s
ettingsKey, iconClasses, noIcon) |
| 1078 { | 1081 { |
| 1079 WebInspector.BaseStorageTreeElement.call(this, storagePanel, null, categoryN
ame, iconClasses, true, noIcon); | 1082 WebInspector.BaseStorageTreeElement.call(this, storagePanel, null, categoryN
ame, iconClasses, false, noIcon); |
| 1080 this._expandedSettingKey = "resources" + settingsKey + "Expanded"; | 1083 this._expandedSettingKey = "resources" + settingsKey + "Expanded"; |
| 1081 WebInspector.settings[this._expandedSettingKey] = WebInspector.settings.crea
teSetting(this._expandedSettingKey, settingsKey === "Frames"); | 1084 WebInspector.settings[this._expandedSettingKey] = WebInspector.settings.crea
teSetting(this._expandedSettingKey, settingsKey === "Frames"); |
| 1082 this._categoryName = categoryName; | 1085 this._categoryName = categoryName; |
| 1083 } | 1086 } |
| 1084 | 1087 |
| 1085 WebInspector.StorageCategoryTreeElement.prototype = { | 1088 WebInspector.StorageCategoryTreeElement.prototype = { |
| 1086 get itemURL() | 1089 get itemURL() |
| 1087 { | 1090 { |
| 1088 return "category://" + this._categoryName; | 1091 return "category://" + this._categoryName; |
| 1089 }, | 1092 }, |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 * @constructor | 1479 * @constructor |
| 1477 * @extends {WebInspector.StorageCategoryTreeElement} | 1480 * @extends {WebInspector.StorageCategoryTreeElement} |
| 1478 * @param {WebInspector.ResourcesPanel} storagePanel | 1481 * @param {WebInspector.ResourcesPanel} storagePanel |
| 1479 */ | 1482 */ |
| 1480 WebInspector.IndexedDBTreeElement = function(storagePanel) | 1483 WebInspector.IndexedDBTreeElement = function(storagePanel) |
| 1481 { | 1484 { |
| 1482 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto
r.UIString("IndexedDB"), "IndexedDB", ["indexed-db-storage-tree-item"]); | 1485 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto
r.UIString("IndexedDB"), "IndexedDB", ["indexed-db-storage-tree-item"]); |
| 1483 } | 1486 } |
| 1484 | 1487 |
| 1485 WebInspector.IndexedDBTreeElement.prototype = { | 1488 WebInspector.IndexedDBTreeElement.prototype = { |
| 1486 onexpand: function() | 1489 _initialize: function() |
| 1487 { | 1490 { |
| 1488 WebInspector.StorageCategoryTreeElement.prototype.onexpand.call(this); | 1491 this._createIndexedDBModel(); |
| 1489 if (!this._indexedDBModel) | |
| 1490 this._createIndexedDBModel(); | |
| 1491 }, | 1492 }, |
| 1492 | 1493 |
| 1493 onattach: function() | 1494 onattach: function() |
| 1494 { | 1495 { |
| 1495 WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this); | 1496 WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this); |
| 1496 this.listItemElement.addEventListener("contextmenu", this._handleContext
MenuEvent.bind(this), true); | 1497 this.listItemElement.addEventListener("contextmenu", this._handleContext
MenuEvent.bind(this), true); |
| 1497 }, | 1498 }, |
| 1498 | 1499 |
| 1499 _handleContextMenuEvent: function(event) | 1500 _handleContextMenuEvent: function(event) |
| 1500 { | 1501 { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 * @constructor | 1592 * @constructor |
| 1592 * @extends {WebInspector.StorageCategoryTreeElement} | 1593 * @extends {WebInspector.StorageCategoryTreeElement} |
| 1593 * @param {WebInspector.ResourcesPanel} storagePanel | 1594 * @param {WebInspector.ResourcesPanel} storagePanel |
| 1594 */ | 1595 */ |
| 1595 WebInspector.FileSystemListTreeElement = function(storagePanel) | 1596 WebInspector.FileSystemListTreeElement = function(storagePanel) |
| 1596 { | 1597 { |
| 1597 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto
r.UIString("FileSystem"), "FileSystem", ["file-system-storage-tree-item"]); | 1598 WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspecto
r.UIString("FileSystem"), "FileSystem", ["file-system-storage-tree-item"]); |
| 1598 } | 1599 } |
| 1599 | 1600 |
| 1600 WebInspector.FileSystemListTreeElement.prototype = { | 1601 WebInspector.FileSystemListTreeElement.prototype = { |
| 1601 onexpand: function() | 1602 _initialize: function() |
| 1602 { | 1603 { |
| 1603 WebInspector.StorageCategoryTreeElement.prototype.onexpand.call(this); | |
| 1604 this._refreshFileSystem(); | 1604 this._refreshFileSystem(); |
| 1605 }, | 1605 }, |
| 1606 | 1606 |
| 1607 onattach: function() | 1607 onattach: function() |
| 1608 { | 1608 { |
| 1609 WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this); | 1609 WebInspector.StorageCategoryTreeElement.prototype.onattach.call(this); |
| 1610 this.listItemElement.addEventListener("contextmenu", this._handleContext
MenuEvent.bind(this), true); | 1610 this.listItemElement.addEventListener("contextmenu", this._handleContext
MenuEvent.bind(this), true); |
| 1611 }, | 1611 }, |
| 1612 | 1612 |
| 1613 _handleContextMenuEvent: function(event) | 1613 _handleContextMenuEvent: function(event) |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2354 */ | 2354 */ |
| 2355 _lastTreeElement: function() | 2355 _lastTreeElement: function() |
| 2356 { | 2356 { |
| 2357 var treeElement = this._root; | 2357 var treeElement = this._root; |
| 2358 var nextTreeElement; | 2358 var nextTreeElement; |
| 2359 while (nextTreeElement = this._traverseNext(treeElement)) | 2359 while (nextTreeElement = this._traverseNext(treeElement)) |
| 2360 treeElement = nextTreeElement; | 2360 treeElement = nextTreeElement; |
| 2361 return treeElement; | 2361 return treeElement; |
| 2362 } | 2362 } |
| 2363 } | 2363 } |
| OLD | NEW |