| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 this.connectivityMessage = createElement("span"); | 44 this.connectivityMessage = createElement("span"); |
| 45 this.connectivityMessage.className = "storage-application-cache-connectivity
"; | 45 this.connectivityMessage.className = "storage-application-cache-connectivity
"; |
| 46 this.connectivityMessage.textContent = ""; | 46 this.connectivityMessage.textContent = ""; |
| 47 | 47 |
| 48 this.statusIcon = createElement("label", "dt-icon-label"); | 48 this.statusIcon = createElement("label", "dt-icon-label"); |
| 49 this.statusMessage = createElement("span"); | 49 this.statusMessage = createElement("span"); |
| 50 this.statusMessage.textContent = ""; | 50 this.statusMessage.textContent = ""; |
| 51 | 51 |
| 52 this._frameId = frameId; | 52 this._frameId = frameId; |
| 53 | 53 |
| 54 this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("No Appli
cation Cache information available.")); | 54 this._emptyWidget = new WebInspector.EmptyWidget(WebInspector.UIString("No A
pplication Cache information available.")); |
| 55 this._emptyView.show(this.element); | 55 this._emptyWidget.show(this.element); |
| 56 | 56 |
| 57 this._markDirty(); | 57 this._markDirty(); |
| 58 | 58 |
| 59 var status = this._model.frameManifestStatus(frameId); | 59 var status = this._model.frameManifestStatus(frameId); |
| 60 this.updateStatus(status); | 60 this.updateStatus(status); |
| 61 | 61 |
| 62 this.updateNetworkState(this._model.onLine); | 62 this.updateNetworkState(this._model.onLine); |
| 63 | 63 |
| 64 // FIXME: Status bar items don't work well enough yet, so they are being hid
den. | 64 // FIXME: Status bar items don't work well enough yet, so they are being hid
den. |
| 65 // http://webkit.org/b/41637 Web Inspector: Give Semantics to "Refresh" and
"Delete" Buttons in ApplicationCache DataGrid | 65 // http://webkit.org/b/41637 Web Inspector: Give Semantics to "Refresh" and
"Delete" Buttons in ApplicationCache DataGrid |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 */ | 156 */ |
| 157 _updateCallback: function(applicationCache) | 157 _updateCallback: function(applicationCache) |
| 158 { | 158 { |
| 159 if (!applicationCache || !applicationCache.manifestURL) { | 159 if (!applicationCache || !applicationCache.manifestURL) { |
| 160 delete this._manifest; | 160 delete this._manifest; |
| 161 delete this._creationTime; | 161 delete this._creationTime; |
| 162 delete this._updateTime; | 162 delete this._updateTime; |
| 163 delete this._size; | 163 delete this._size; |
| 164 delete this._resources; | 164 delete this._resources; |
| 165 | 165 |
| 166 this._emptyView.show(this.element); | 166 this._emptyWidget.show(this.element); |
| 167 this.deleteButton.setVisible(false); | 167 this.deleteButton.setVisible(false); |
| 168 if (this._dataGrid) | 168 if (this._dataGrid) |
| 169 this._dataGrid.element.classList.add("hidden"); | 169 this._dataGrid.element.classList.add("hidden"); |
| 170 return; | 170 return; |
| 171 } | 171 } |
| 172 // FIXME: are these variables needed anywhere else? | 172 // FIXME: are these variables needed anywhere else? |
| 173 this._manifest = applicationCache.manifestURL; | 173 this._manifest = applicationCache.manifestURL; |
| 174 this._creationTime = applicationCache.creationTime; | 174 this._creationTime = applicationCache.creationTime; |
| 175 this._updateTime = applicationCache.updateTime; | 175 this._updateTime = applicationCache.updateTime; |
| 176 this._size = applicationCache.size; | 176 this._size = applicationCache.size; |
| 177 this._resources = applicationCache.resources; | 177 this._resources = applicationCache.resources; |
| 178 | 178 |
| 179 if (!this._dataGrid) | 179 if (!this._dataGrid) |
| 180 this._createDataGrid(); | 180 this._createDataGrid(); |
| 181 | 181 |
| 182 this._populateDataGrid(); | 182 this._populateDataGrid(); |
| 183 this._dataGrid.autoSizeColumns(20, 80); | 183 this._dataGrid.autoSizeColumns(20, 80); |
| 184 this._dataGrid.element.classList.remove("hidden"); | 184 this._dataGrid.element.classList.remove("hidden"); |
| 185 this._emptyView.detach(); | 185 this._emptyWidget.detach(); |
| 186 this.deleteButton.setVisible(true); | 186 this.deleteButton.setVisible(true); |
| 187 | 187 |
| 188 // FIXME: For Chrome, put creationTime and updateTime somewhere. | 188 // FIXME: For Chrome, put creationTime and updateTime somewhere. |
| 189 // NOTE: localizedString has not yet been added. | 189 // NOTE: localizedString has not yet been added. |
| 190 // WebInspector.UIString("(%s) Created: %s Updated: %s", this._size, thi
s._creationTime, this._updateTime); | 190 // WebInspector.UIString("(%s) Created: %s Updated: %s", this._size, thi
s._creationTime, this._updateTime); |
| 191 }, | 191 }, |
| 192 | 192 |
| 193 _createDataGrid: function() | 193 _createDataGrid: function() |
| 194 { | 194 { |
| 195 var columns = [ | 195 var columns = [ |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 _deleteCallback: function(node) | 260 _deleteCallback: function(node) |
| 261 { | 261 { |
| 262 // FIXME: Should we delete a single (selected) resource or all resources
? | 262 // FIXME: Should we delete a single (selected) resource or all resources
? |
| 263 // InspectorBackend.deleteCachedResource(...) | 263 // InspectorBackend.deleteCachedResource(...) |
| 264 // this._update(); | 264 // this._update(); |
| 265 }, | 265 }, |
| 266 | 266 |
| 267 __proto__: WebInspector.VBox.prototype | 267 __proto__: WebInspector.VBox.prototype |
| 268 } | 268 } |
| 269 | 269 |
| OLD | NEW |