OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 this._directoryTree = new TreeOutline(directoryTreeElement); | 43 this._directoryTree = new TreeOutline(directoryTreeElement); |
44 this.sidebarElement().appendChild(directoryTreeElement); | 44 this.sidebarElement().appendChild(directoryTreeElement); |
45 this.sidebarElement().classList.add("outline-disclosure", "sidebar"); | 45 this.sidebarElement().classList.add("outline-disclosure", "sidebar"); |
46 | 46 |
47 var rootItem = new WebInspector.FileSystemView.EntryTreeElement(this, fileSy
stem.root); | 47 var rootItem = new WebInspector.FileSystemView.EntryTreeElement(this, fileSy
stem.root); |
48 rootItem.expanded = true; | 48 rootItem.expanded = true; |
49 this._directoryTree.appendChild(rootItem); | 49 this._directoryTree.appendChild(rootItem); |
50 this._visibleView = null; | 50 this._visibleView = null; |
51 | 51 |
52 this._refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString
("Refresh"), "refresh-storage-status-bar-item"); | 52 this._refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString
("Refresh"), "refresh-storage-status-bar-item"); |
53 this._refreshButton.visible = true; | 53 this._refreshButton.setVisible(true); |
54 this._refreshButton.addEventListener("click", this._refresh, this); | 54 this._refreshButton.addEventListener("click", this._refresh, this); |
55 | 55 |
56 this._deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString(
"Delete"), "delete-storage-status-bar-item"); | 56 this._deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString(
"Delete"), "delete-storage-status-bar-item"); |
57 this._deleteButton.visible = true; | 57 this._deleteButton.setVisible(true); |
58 this._deleteButton.addEventListener("click", this._confirmDelete, this); | 58 this._deleteButton.addEventListener("click", this._confirmDelete, this); |
59 } | 59 } |
60 | 60 |
61 WebInspector.FileSystemView.prototype = { | 61 WebInspector.FileSystemView.prototype = { |
62 /** | 62 /** |
63 * @type {!Array.<!Element>} | 63 * @type {!Array.<!Element>} |
64 */ | 64 */ |
65 get statusBarItems() | 65 get statusBarItems() |
66 { | 66 { |
67 return [this._refreshButton.element, this._deleteButton.element]; | 67 return [this._refreshButton.element, this._deleteButton.element]; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 }, | 234 }, |
235 | 235 |
236 _deletionCompleted: function() | 236 _deletionCompleted: function() |
237 { | 237 { |
238 if (this._entry != this._entry.fileSystem.root) | 238 if (this._entry != this._entry.fileSystem.root) |
239 this.parent.refresh(); | 239 this.parent.refresh(); |
240 }, | 240 }, |
241 | 241 |
242 __proto__: TreeElement.prototype | 242 __proto__: TreeElement.prototype |
243 } | 243 } |
OLD | NEW |