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

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

Issue 2608043002: DevTools: extract modules (with extensions) (Closed)
Patch Set: fixes Created 3 years, 11 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 this._emptyWidget.show(this.element); 97 this._emptyWidget.show(this.element);
98 this._clearButton.setVisible(false); 98 this._clearButton.setVisible(false);
99 this._deleteButton.setVisible(false); 99 this._deleteButton.setVisible(false);
100 if (this._cookiesTable) 100 if (this._cookiesTable)
101 this._cookiesTable.detach(); 101 this._cookiesTable.detach();
102 return; 102 return;
103 } 103 }
104 104
105 if (!this._cookiesTable) { 105 if (!this._cookiesTable) {
106 this._cookiesTable = 106 this._cookiesTable =
107 new Components.CookiesTable(false, this._update.bind(this), this._show DeleteButton.bind(this)); 107 new CookieTable.CookiesTable(false, this._update.bind(this), this._sho wDeleteButton.bind(this));
108 } 108 }
109 109
110 this._cookiesTable.setCookies(this._cookies); 110 this._cookiesTable.setCookies(this._cookies);
111 this._emptyWidget.detach(); 111 this._emptyWidget.detach();
112 this._cookiesTable.show(this.element); 112 this._cookiesTable.show(this.element);
113 this._treeElement.subtitle = 113 this._treeElement.subtitle =
114 String.sprintf(Common.UIString('%d cookies (%s)'), this._cookies.length, Number.bytesToString(this._totalSize)); 114 String.sprintf(Common.UIString('%d cookies (%s)'), this._cookies.length, Number.bytesToString(this._totalSize));
115 this._clearButton.setVisible(true); 115 this._clearButton.setVisible(true);
116 this._deleteButton.setVisible(!!this._cookiesTable.selectedCookie()); 116 this._deleteButton.setVisible(!!this._cookiesTable.selectedCookie());
117 } 117 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 _contextMenu(event) { 188 _contextMenu(event) {
189 if (!this._cookies.length) { 189 if (!this._cookies.length) {
190 var contextMenu = new UI.ContextMenu(event); 190 var contextMenu = new UI.ContextMenu(event);
191 contextMenu.appendItem(Common.UIString('Refresh'), this._update.bind(this) ); 191 contextMenu.appendItem(Common.UIString('Refresh'), this._update.bind(this) );
192 contextMenu.show(); 192 contextMenu.show();
193 } 193 }
194 } 194 }
195 }; 195 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698