Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js

Issue 2152093002: DevTools: fix compilation for the VBoxes with toolbar items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 /** 30 /**
31 * @constructor 31 * @constructor
32 * @extends {WebInspector.VBox} 32 * @extends {WebInspector.VBoxWithToolbarItems}
33 */ 33 */
34 WebInspector.CookieItemsView = function(treeElement, cookieDomain) 34 WebInspector.CookieItemsView = function(treeElement, cookieDomain)
35 { 35 {
36 WebInspector.VBox.call(this); 36 WebInspector.VBoxWithToolbarItems.call(this);
37 37
38 this.element.classList.add("storage-view"); 38 this.element.classList.add("storage-view");
39 39
40 this._deleteButton = new WebInspector.ToolbarButton(WebInspector.UIString("D elete"), "delete-toolbar-item"); 40 this._deleteButton = new WebInspector.ToolbarButton(WebInspector.UIString("D elete"), "delete-toolbar-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._clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("Cl ear"), "clear-toolbar-item"); 44 this._clearButton = new WebInspector.ToolbarButton(WebInspector.UIString("Cl ear"), "clear-toolbar-item");
45 this._clearButton.setVisible(false); 45 this._clearButton.setVisible(false);
46 this._clearButton.addEventListener("click", this._clearButtonClicked, this); 46 this._clearButton.addEventListener("click", this._clearButtonClicked, this);
47 47
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 * @return {!Array.<!WebInspector.ToolbarItem>} 63 * @return {!Array.<!WebInspector.ToolbarItem>}
63 */ 64 */
64 toolbarItems: function() 65 toolbarItems: function()
65 { 66 {
66 return [this._refreshButton, this._clearButton, this._deleteButton]; 67 return [this._refreshButton, this._clearButton, this._deleteButton];
67 }, 68 },
68 69
69 wasShown: function() 70 wasShown: function()
70 { 71 {
71 this._update(); 72 this._update();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 _contextMenu: function(event) 181 _contextMenu: function(event)
181 { 182 {
182 if (!this._cookies.length) { 183 if (!this._cookies.length) {
183 var contextMenu = new WebInspector.ContextMenu(event); 184 var contextMenu = new WebInspector.ContextMenu(event);
184 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat e.bind(this)); 185 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat e.bind(this));
185 contextMenu.show(); 186 contextMenu.show();
186 } 187 }
187 }, 188 },
188 189
189 __proto__: WebInspector.VBox.prototype 190 __proto__: WebInspector.VBoxWithToolbarItems.prototype
190 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698