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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 this.applicationCacheListTreeElement = new WebInspector.StorageCategoryTreeE
lement(this, WebInspector.UIString("Application Cache"), "ApplicationCache", ["a
pplication-cache-storage-tree-item"]); | 64 this.applicationCacheListTreeElement = new WebInspector.StorageCategoryTreeE
lement(this, WebInspector.UIString("Application Cache"), "ApplicationCache", ["a
pplication-cache-storage-tree-item"]); |
65 this.sidebarTree.appendChild(this.applicationCacheListTreeElement); | 65 this.sidebarTree.appendChild(this.applicationCacheListTreeElement); |
66 | 66 |
67 if (Runtime.experiments.isEnabled("fileSystemInspection")) { | 67 if (Runtime.experiments.isEnabled("fileSystemInspection")) { |
68 this.fileSystemListTreeElement = new WebInspector.FileSystemListTreeElem
ent(this); | 68 this.fileSystemListTreeElement = new WebInspector.FileSystemListTreeElem
ent(this); |
69 this.sidebarTree.appendChild(this.fileSystemListTreeElement); | 69 this.sidebarTree.appendChild(this.fileSystemListTreeElement); |
70 } | 70 } |
71 | 71 |
72 var mainView = new WebInspector.VBox(); | 72 var mainView = new WebInspector.VBox(); |
73 this.storageViews = mainView.element.createChild("div", "resources-main diff
-container"); | 73 this.storageViews = mainView.element.createChild("div", "vbox flex-auto"); |
74 var statusBarContainer = mainView.element.createChild("div", "resources-stat
us-bar"); | 74 this._storageViewStatusBar = new WebInspector.StatusBar(mainView.element); |
75 this.storageViewStatusBarItemsContainer = statusBarContainer.createChild("di
v", "status-bar"); | 75 this._storageViewStatusBar.element.classList.add("resources-status-bar"); |
76 mainView.show(this.mainElement()); | 76 mainView.show(this.mainElement()); |
77 | 77 |
78 /** @type {!Map.<!WebInspector.Database, !Object.<string, !WebInspector.Data
baseTableView>>} */ | 78 /** @type {!Map.<!WebInspector.Database, !Object.<string, !WebInspector.Data
baseTableView>>} */ |
79 this._databaseTableViews = new Map(); | 79 this._databaseTableViews = new Map(); |
80 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseQueryView>} *
/ | 80 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseQueryView>} *
/ |
81 this._databaseQueryViews = new Map(); | 81 this._databaseQueryViews = new Map(); |
82 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseTreeElement>}
*/ | 82 /** @type {!Map.<!WebInspector.Database, !WebInspector.DatabaseTreeElement>}
*/ |
83 this._databaseTreeElements = new Map(); | 83 this._databaseTreeElements = new Map(); |
84 /** @type {!Map.<!WebInspector.DOMStorage, !WebInspector.DOMStorageItemsView
>} */ | 84 /** @type {!Map.<!WebInspector.DOMStorage, !WebInspector.DOMStorageItemsView
>} */ |
85 this._domStorageViews = new Map(); | 85 this._domStorageViews = new Map(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 this._cookieViews = {}; | 225 this._cookieViews = {}; |
226 | 226 |
227 this.databasesListTreeElement.removeChildren(); | 227 this.databasesListTreeElement.removeChildren(); |
228 this.localStorageListTreeElement.removeChildren(); | 228 this.localStorageListTreeElement.removeChildren(); |
229 this.sessionStorageListTreeElement.removeChildren(); | 229 this.sessionStorageListTreeElement.removeChildren(); |
230 this.cookieListTreeElement.removeChildren(); | 230 this.cookieListTreeElement.removeChildren(); |
231 | 231 |
232 if (this.visibleView && !(this.visibleView instanceof WebInspector.Stora
geCategoryView)) | 232 if (this.visibleView && !(this.visibleView instanceof WebInspector.Stora
geCategoryView)) |
233 this.visibleView.detach(); | 233 this.visibleView.detach(); |
234 | 234 |
235 this.storageViewStatusBarItemsContainer.removeChildren(); | 235 this._storageViewStatusBar.removeStatusBarItems(); |
236 | 236 |
237 if (this.sidebarTree.selectedTreeElement) | 237 if (this.sidebarTree.selectedTreeElement) |
238 this.sidebarTree.selectedTreeElement.deselect(); | 238 this.sidebarTree.selectedTreeElement.deselect(); |
239 }, | 239 }, |
240 | 240 |
241 _populateResourceTree: function() | 241 _populateResourceTree: function() |
242 { | 242 { |
243 this._treeElementForFrameId = {}; | 243 this._treeElementForFrameId = {}; |
244 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTre
eModel.EventTypes.FrameAdded, this._frameAdded, this); | 244 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTre
eModel.EventTypes.FrameAdded, this._frameAdded, this); |
245 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTre
eModel.EventTypes.FrameNavigated, this._frameNavigated, this); | 245 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTre
eModel.EventTypes.FrameNavigated, this._frameNavigated, this); |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 { | 613 { |
614 if (this.visibleView === view) | 614 if (this.visibleView === view) |
615 return; | 615 return; |
616 | 616 |
617 if (this.visibleView) | 617 if (this.visibleView) |
618 this.visibleView.detach(); | 618 this.visibleView.detach(); |
619 | 619 |
620 view.show(this.storageViews); | 620 view.show(this.storageViews); |
621 this.visibleView = view; | 621 this.visibleView = view; |
622 | 622 |
623 this.storageViewStatusBarItemsContainer.removeChildren(); | 623 this._storageViewStatusBar.removeStatusBarItems(); |
624 var statusBarItems = view.statusBarItems || []; | 624 var statusBarItems = view.statusBarItems ? view.statusBarItems() : null; |
625 for (var i = 0; i < statusBarItems.length; ++i) | 625 for (var i = 0; statusBarItems && i < statusBarItems.length; ++i) |
626 this.storageViewStatusBarItemsContainer.appendChild(statusBarItems[i
]); | 626 this._storageViewStatusBar.appendStatusBarItem(statusBarItems[i]); |
627 }, | 627 }, |
628 | 628 |
629 closeVisibleView: function() | 629 closeVisibleView: function() |
630 { | 630 { |
631 if (!this.visibleView) | 631 if (!this.visibleView) |
632 return; | 632 return; |
633 this.visibleView.detach(); | 633 this.visibleView.detach(); |
634 delete this.visibleView; | 634 delete this.visibleView; |
635 }, | 635 }, |
636 | 636 |
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 WebInspector.StorageCategoryView = function() | 2147 WebInspector.StorageCategoryView = function() |
2148 { | 2148 { |
2149 WebInspector.VBox.call(this); | 2149 WebInspector.VBox.call(this); |
2150 | 2150 |
2151 this.element.classList.add("storage-view"); | 2151 this.element.classList.add("storage-view"); |
2152 this._emptyView = new WebInspector.EmptyView(""); | 2152 this._emptyView = new WebInspector.EmptyView(""); |
2153 this._emptyView.show(this.element); | 2153 this._emptyView.show(this.element); |
2154 } | 2154 } |
2155 | 2155 |
2156 WebInspector.StorageCategoryView.prototype = { | 2156 WebInspector.StorageCategoryView.prototype = { |
| 2157 /** |
| 2158 * @return {!Array.<!WebInspector.StatusBarItem>} |
| 2159 */ |
| 2160 statusBarItems: function() |
| 2161 { |
| 2162 return []; |
| 2163 }, |
| 2164 |
2157 setText: function(text) | 2165 setText: function(text) |
2158 { | 2166 { |
2159 this._emptyView.text = text; | 2167 this._emptyView.text = text; |
2160 }, | 2168 }, |
2161 | 2169 |
2162 __proto__: WebInspector.VBox.prototype | 2170 __proto__: WebInspector.VBox.prototype |
2163 } | 2171 } |
2164 | 2172 |
2165 WebInspector.ResourcesPanel.show = function() | 2173 WebInspector.ResourcesPanel.show = function() |
2166 { | 2174 { |
(...skipping 20 matching lines...) Expand all Loading... |
2187 | 2195 |
2188 WebInspector.ResourcesPanelFactory.prototype = { | 2196 WebInspector.ResourcesPanelFactory.prototype = { |
2189 /** | 2197 /** |
2190 * @return {!WebInspector.Panel} | 2198 * @return {!WebInspector.Panel} |
2191 */ | 2199 */ |
2192 createPanel: function() | 2200 createPanel: function() |
2193 { | 2201 { |
2194 return WebInspector.ResourcesPanel._instance(); | 2202 return WebInspector.ResourcesPanel._instance(); |
2195 } | 2203 } |
2196 } | 2204 } |
OLD | NEW |