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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 1661533002: Implement deletion of storage per site. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given 7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given
8 * category. 8 * category.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 12 matching lines...) Expand all
23 properties: { 23 properties: {
24 /** 24 /**
25 * Preferences state. 25 * Preferences state.
26 */ 26 */
27 prefs: { 27 prefs: {
28 type: Object, 28 type: Object,
29 notify: true, 29 notify: true,
30 }, 30 },
31 31
32 /** 32 /**
33 * The current active route.
34 */
35 currentRoute: {
36 type: Object,
37 notify: true,
38 },
39
40 /**
33 * The origin that was selected by the user in the dropdown list. 41 * The origin that was selected by the user in the dropdown list.
34 */ 42 */
35 selectedOrigin: { 43 selectedOrigin: {
36 type: String, 44 type: String,
37 notify: true, 45 notify: true,
38 }, 46 },
39 47
40 /** 48 /**
41 * Array of sites to display in the widget. 49 * Array of sites to display in the widget.
42 */ 50 */
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 this.category != settings.ContentSettingsTypes.FULLSCREEN; 202 this.category != settings.ContentSettingsTypes.FULLSCREEN;
195 }, 203 },
196 204
197 /** 205 /**
198 * A handler for selecting a site (by clicking on the origin). 206 * A handler for selecting a site (by clicking on the origin).
199 * @param {!{model: !{item: !{url: string}}}} event 207 * @param {!{model: !{item: !{url: string}}}} event
200 * @private 208 * @private
201 */ 209 */
202 onOriginTap_: function(event) { 210 onOriginTap_: function(event) {
203 this.selectedOrigin = event.model.item.url; 211 this.selectedOrigin = event.model.item.url;
212 var categorySelected = this.computeCategoryTextId(this.category);
213 this.currentRoute = {
214 page: this.currentRoute.page,
215 section: 'privacy',
216 subpage: ['site-settings', 'site-settings-category-' +
217 categorySelected, 'site-details'],
218 };
204 }, 219 },
205 220
206 /** 221 /**
207 * A handler for activating one of the menu action items. 222 * A handler for activating one of the menu action items.
208 * @param {!{model: !{item: !{url: string}}, 223 * @param {!{model: !{item: !{url: string}},
209 * target: !{selectedItems: !{textContent: string}}}} event 224 * target: !{selectedItems: !{textContent: string}}}} event
210 * @private 225 * @private
211 */ 226 */
212 onActionMenuIronSelect_: function(event) { 227 onActionMenuIronSelect_: function(event) {
213 var origin = event.model.item.url; 228 var origin = event.model.item.url;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 * Returns the icon to use for a given site. 291 * Returns the icon to use for a given site.
277 * @param {string} url The url of the site to fetch the icon for. 292 * @param {string} url The url of the site to fetch the icon for.
278 * @private 293 * @private
279 */ 294 */
280 computeSiteIcon_: function(url) { 295 computeSiteIcon_: function(url) {
281 // TODO(finnur): For now, we're returning a placeholder image for each site 296 // TODO(finnur): For now, we're returning a placeholder image for each site
282 // but the actual favicon for each site will need to be returned. 297 // but the actual favicon for each site will need to be returned.
283 return 'communication:message'; 298 return 'communication:message';
284 }, 299 },
285 }); 300 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698