| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 this._refreshButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Refresh"), "refresh-toolbar-item"); | 48 this._refreshButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Refresh"), "refresh-toolbar-item"); |
| 49 this._refreshButton.addEventListener("click", this._refreshButtonClicked, th
is); | 49 this._refreshButton.addEventListener("click", this._refreshButtonClicked, th
is); |
| 50 | 50 |
| 51 this._treeElement = treeElement; | 51 this._treeElement = treeElement; |
| 52 this._cookieDomain = cookieDomain; | 52 this._cookieDomain = cookieDomain; |
| 53 | 53 |
| 54 this._emptyWidget = new WebInspector.EmptyWidget(cookieDomain ? WebInspector
.UIString("This site has no cookies.") : WebInspector.UIString("By default cooki
es are disabled for local files.\nYou could override this by starting the browse
r with --enable-file-cookies command line flag.")); | 54 this._emptyWidget = new WebInspector.EmptyWidget(cookieDomain ? WebInspector
.UIString("This site has no cookies.") : WebInspector.UIString("By default cooki
es are disabled for local files.\nYou could override this by starting the browse
r with --enable-file-cookies command line flag.")); |
| 55 this._emptyWidget.show(this.element); | 55 this._emptyWidget.show(this.element); |
| 56 | 56 |
| 57 this.element.addEventListener("contextmenu", this._contextMenu.bind(this), t
rue); | 57 this.element.addEventListener("contextmenu", this._contextMenu.bind(this), t
rue); |
| 58 } | 58 }; |
| 59 | 59 |
| 60 WebInspector.CookieItemsView.prototype = { | 60 WebInspector.CookieItemsView.prototype = { |
| 61 /** | 61 /** |
| 62 * @override | 62 * @override |
| 63 * @return {!Array.<!WebInspector.ToolbarItem>} | 63 * @return {!Array.<!WebInspector.ToolbarItem>} |
| 64 */ | 64 */ |
| 65 syncToolbarItems: function() | 65 syncToolbarItems: function() |
| 66 { | 66 { |
| 67 return [this._refreshButton, this._clearButton, this._deleteButton]; | 67 return [this._refreshButton, this._clearButton, this._deleteButton]; |
| 68 }, | 68 }, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 _contextMenu: function(event) | 181 _contextMenu: function(event) |
| 182 { | 182 { |
| 183 if (!this._cookies.length) { | 183 if (!this._cookies.length) { |
| 184 var contextMenu = new WebInspector.ContextMenu(event); | 184 var contextMenu = new WebInspector.ContextMenu(event); |
| 185 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat
e.bind(this)); | 185 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat
e.bind(this)); |
| 186 contextMenu.show(); | 186 contextMenu.show(); |
| 187 } | 187 } |
| 188 }, | 188 }, |
| 189 | 189 |
| 190 __proto__: WebInspector.SimpleView.prototype | 190 __proto__: WebInspector.SimpleView.prototype |
| 191 } | 191 }; |
| OLD | NEW |