OLD | NEW |
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 Polymer({ | 10 Polymer({ |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 this.categorySubtype != settings.PermissionValues.SESSION_ONLY && | 375 this.categorySubtype != settings.PermissionValues.SESSION_ONLY && |
376 this.category == settings.ContentSettingsTypes.COOKIES; | 376 this.category == settings.ContentSettingsTypes.COOKIES; |
377 }, | 377 }, |
378 | 378 |
379 /** | 379 /** |
380 * A handler for selecting a site (by clicking on the origin). | 380 * A handler for selecting a site (by clicking on the origin). |
381 * @private | 381 * @private |
382 */ | 382 */ |
383 onOriginTap_: function(event) { | 383 onOriginTap_: function(event) { |
384 this.selectedSite = event.model.item; | 384 this.selectedSite = event.model.item; |
385 var categorySelected = | 385 if (this.allSites) |
386 this.allSites ? | 386 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL_DETAILS); |
387 'all-sites' : | 387 else |
388 'site-settings-category-' + this.computeCategoryTextId(this.category); | 388 settings.navigateTo(this.computeCategoryDetailsRoute(this.category)); |
389 this.currentRoute = { | |
390 page: this.currentRoute.page, | |
391 section: 'privacy', | |
392 subpage: ['site-settings', categorySelected, 'site-details'], | |
393 }; | |
394 }, | 389 }, |
395 | 390 |
396 /** | 391 /** |
397 * A handler for activating one of the menu action items. | 392 * A handler for activating one of the menu action items. |
398 * @param {!{model: !{item: !{origin: string}}, | 393 * @param {!{model: !{item: !{origin: string}}, |
399 * detail: !{selected: string}}} event | 394 * detail: !{selected: string}}} event |
400 * @private | 395 * @private |
401 */ | 396 */ |
402 onActionMenuIronActivate_: function(event) { | 397 onActionMenuIronActivate_: function(event) { |
403 var origin = event.model.item.origin; | 398 var origin = event.model.item.origin; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // is redundant to also list all the sites that are blocked. | 459 // is redundant to also list all the sites that are blocked. |
465 if (this.isAllowList_()) | 460 if (this.isAllowList_()) |
466 return true; | 461 return true; |
467 | 462 |
468 if (this.isSessionOnlyList_()) | 463 if (this.isSessionOnlyList_()) |
469 return siteList.length > 0; | 464 return siteList.length > 0; |
470 | 465 |
471 return toggleState; | 466 return toggleState; |
472 }, | 467 }, |
473 }); | 468 }); |
OLD | NEW |