| 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 28 matching lines...) Expand all Loading... |
| 39 // FIXME: Needs better tooltip. (Localized) | 39 // FIXME: Needs better tooltip. (Localized) |
| 40 this.deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString("
Delete"), "delete-storage-status-bar-item"); | 40 this.deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString("
Delete"), "delete-storage-status-bar-item"); |
| 41 this.deleteButton.setVisible(false); | 41 this.deleteButton.setVisible(false); |
| 42 this.deleteButton.addEventListener("click", this._deleteButtonClicked, this)
; | 42 this.deleteButton.addEventListener("click", this._deleteButtonClicked, this)
; |
| 43 | 43 |
| 44 this.connectivityIcon = createElement("div"); | 44 this.connectivityIcon = createElement("div"); |
| 45 this.connectivityMessage = createElement("span"); | 45 this.connectivityMessage = createElement("span"); |
| 46 this.connectivityMessage.className = "storage-application-cache-connectivity
"; | 46 this.connectivityMessage.className = "storage-application-cache-connectivity
"; |
| 47 this.connectivityMessage.textContent = ""; | 47 this.connectivityMessage.textContent = ""; |
| 48 | 48 |
| 49 this.divider = createElement("span"); | 49 this.divider = new WebInspector.StatusBarSeparator(); |
| 50 this.divider.className = "status-bar-item status-bar-divider"; | |
| 51 | 50 |
| 52 this.statusIcon = createElement("div"); | 51 this.statusIcon = createElement("div"); |
| 53 this.statusMessage = createElement("span"); | 52 this.statusMessage = createElement("span"); |
| 54 this.statusMessage.className = "storage-application-cache-status"; | 53 this.statusMessage.className = "storage-application-cache-status"; |
| 55 this.statusMessage.textContent = ""; | 54 this.statusMessage.textContent = ""; |
| 56 | 55 |
| 57 this._frameId = frameId; | 56 this._frameId = frameId; |
| 58 | 57 |
| 59 this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("No Appli
cation Cache information available.")); | 58 this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("No Appli
cation Cache information available.")); |
| 60 this._emptyView.show(this.element); | 59 this._emptyView.show(this.element); |
| 61 | 60 |
| 62 this._markDirty(); | 61 this._markDirty(); |
| 63 | 62 |
| 64 var status = this._model.frameManifestStatus(frameId); | 63 var status = this._model.frameManifestStatus(frameId); |
| 65 this.updateStatus(status); | 64 this.updateStatus(status); |
| 66 | 65 |
| 67 this.updateNetworkState(this._model.onLine); | 66 this.updateNetworkState(this._model.onLine); |
| 68 | 67 |
| 69 // FIXME: Status bar items don't work well enough yet, so they are being hid
den. | 68 // FIXME: Status bar items don't work well enough yet, so they are being hid
den. |
| 70 // http://webkit.org/b/41637 Web Inspector: Give Semantics to "Refresh" and
"Delete" Buttons in ApplicationCache DataGrid | 69 // http://webkit.org/b/41637 Web Inspector: Give Semantics to "Refresh" and
"Delete" Buttons in ApplicationCache DataGrid |
| 71 this.deleteButton.element.style.display = "none"; | 70 this.deleteButton.element.style.display = "none"; |
| 72 } | 71 } |
| 73 | 72 |
| 74 WebInspector.ApplicationCacheItemsView.prototype = { | 73 WebInspector.ApplicationCacheItemsView.prototype = { |
| 75 get statusBarItems() | 74 /** |
| 75 * @return {!Array.<!WebInspector.StatusBarItem>} |
| 76 */ |
| 77 statusBarItems: function() |
| 76 { | 78 { |
| 77 return [ | 79 return [ |
| 78 this.deleteButton.element, | 80 this.deleteButton, |
| 79 this.connectivityIcon, this.connectivityMessage, this.divider, | 81 new WebInspector.StatusBarItem(this.connectivityIcon), |
| 80 this.statusIcon, this.statusMessage | 82 new WebInspector.StatusBarItem(this.connectivityMessage), |
| 83 this.divider, |
| 84 new WebInspector.StatusBarItem(this.statusIcon), |
| 85 new WebInspector.StatusBarItem(this.statusMessage) |
| 81 ]; | 86 ]; |
| 82 }, | 87 }, |
| 83 | 88 |
| 84 wasShown: function() | 89 wasShown: function() |
| 85 { | 90 { |
| 86 this._maybeUpdate(); | 91 this._maybeUpdate(); |
| 87 }, | 92 }, |
| 88 | 93 |
| 89 willHide: function() | 94 willHide: function() |
| 90 { | 95 { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 _deleteCallback: function(node) | 265 _deleteCallback: function(node) |
| 261 { | 266 { |
| 262 // FIXME: Should we delete a single (selected) resource or all resources
? | 267 // FIXME: Should we delete a single (selected) resource or all resources
? |
| 263 // InspectorBackend.deleteCachedResource(...) | 268 // InspectorBackend.deleteCachedResource(...) |
| 264 // this._update(); | 269 // this._update(); |
| 265 }, | 270 }, |
| 266 | 271 |
| 267 __proto__: WebInspector.VBox.prototype | 272 __proto__: WebInspector.VBox.prototype |
| 268 } | 273 } |
| 269 | 274 |
| OLD | NEW |