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

Side by Side Diff: chrome/browser/resources/options2/cookies_list.js

Issue 10636019: Adding Application Data dialog for isolated apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on review by Bernhard. Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var DeletableItemList = options.DeletableItemList; 6 /** @const */ var DeletableItemList = options.DeletableItemList;
7 /** @const */ var DeletableItem = options.DeletableItem; 7 /** @const */ var DeletableItem = options.DeletableItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 return listItem; 112 return listItem;
113 } 113 }
114 114
115 CookieListItem.prototype = { 115 CookieListItem.prototype = {
116 __proto__: DeletableItem.prototype, 116 __proto__: DeletableItem.prototype,
117 117
118 /** @inheritDoc */ 118 /** @inheritDoc */
119 decorate: function() { 119 decorate: function() {
120 this.siteChild = this.ownerDocument.createElement('div'); 120 this.siteChild = this.ownerDocument.createElement('div');
121 this.siteChild.className = 'cookie-site';
122 this.dataChild = this.ownerDocument.createElement('div'); 121 this.dataChild = this.ownerDocument.createElement('div');
123 this.dataChild.className = 'cookie-data';
124 this.sizeChild = this.ownerDocument.createElement('div'); 122 this.sizeChild = this.ownerDocument.createElement('div');
125 this.sizeChild.className = 'cookie-size';
126 this.itemsChild = this.ownerDocument.createElement('div'); 123 this.itemsChild = this.ownerDocument.createElement('div');
127 this.itemsChild.className = 'cookie-items';
128 this.infoChild = this.ownerDocument.createElement('div'); 124 this.infoChild = this.ownerDocument.createElement('div');
129 this.infoChild.className = 'cookie-details';
130 this.infoChild.hidden = true; 125 this.infoChild.hidden = true;
126
127 if (this.origin.data.appId && this.origin.data.appId !== '') {
Evan Stade 2012/06/27 04:53:00 '' is falsey so the second half of this check is n
nasko 2012/06/27 17:17:01 The second half is supposed to check if the appId
Evan Stade 2012/06/28 04:15:13 for which value of this.origin.data.appId does [1]
nasko 2012/06/29 00:46:52 Done.
128 this.siteChild.className = 'app-cookie-site';
129 this.dataChild.className = 'app-cookie-data';
130 this.sizeChild.className = 'app-cookie-size';
131 this.itemsChild.className = 'app-cookie-items';
132 this.infoChild.className = 'app-cookie-details';
133 } else {
134 this.siteChild.className = 'cookie-site';
135 this.dataChild.className = 'cookie-data';
136 this.sizeChild.className = 'cookie-size';
137 this.itemsChild.className = 'cookie-items';
138 this.infoChild.className = 'cookie-details';
139 }
140
131 var remove = this.ownerDocument.createElement('button'); 141 var remove = this.ownerDocument.createElement('button');
132 remove.textContent = loadTimeData.getString('remove_cookie'); 142 remove.textContent = loadTimeData.getString('remove_cookie');
133 remove.onclick = this.removeCookie_.bind(this); 143 remove.onclick = this.removeCookie_.bind(this);
134 this.infoChild.appendChild(remove); 144 this.infoChild.appendChild(remove);
135 var content = this.contentElement; 145 var content = this.contentElement;
136 content.appendChild(this.siteChild); 146 content.appendChild(this.siteChild);
137 content.appendChild(this.dataChild); 147 content.appendChild(this.dataChild);
138 content.appendChild(this.sizeChild); 148 content.appendChild(this.sizeChild);
139 content.appendChild(this.itemsChild); 149 content.appendChild(this.itemsChild);
140 this.itemsChild.appendChild(this.infoChild); 150 this.itemsChild.appendChild(this.infoChild);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 parent.clear(); 864 parent.clear();
855 this.addByParent_(parent, 0, children); 865 this.addByParent_(parent, 0, children);
856 parent.endBatchUpdates(); 866 parent.endBatchUpdates();
857 }, 867 },
858 }; 868 };
859 869
860 return { 870 return {
861 CookiesList: CookiesList 871 CookiesList: CookiesList
862 }; 872 };
863 }); 873 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698