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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 }, | 352 }, |
353 | 353 |
354 /** | 354 /** |
355 * Setup the values to use for the action menu. | 355 * Setup the values to use for the action menu. |
356 * @private | 356 * @private |
357 */ | 357 */ |
358 setUpActionMenu_: function() { | 358 setUpActionMenu_: function() { |
359 this.showAllowAction_ = | 359 this.showAllowAction_ = |
360 this.categorySubtype == settings.PermissionValues.BLOCK; | 360 this.categorySubtype == settings.PermissionValues.BLOCK; |
361 this.showBlockAction_ = | 361 this.showBlockAction_ = |
362 this.categorySubtype == settings.PermissionValues.ALLOW && | 362 this.categorySubtype == settings.PermissionValues.ALLOW; |
363 this.category != settings.ContentSettingsTypes.FULLSCREEN; | |
364 }, | 363 }, |
365 | 364 |
366 /** | 365 /** |
367 * A handler for selecting a site (by clicking on the origin). | 366 * A handler for selecting a site (by clicking on the origin). |
368 * @private | 367 * @private |
369 */ | 368 */ |
370 onOriginTap_: function(event) { | 369 onOriginTap_: function(event) { |
371 this.selectedSite = event.model.item; | 370 this.selectedSite = event.model.item; |
372 var categorySelected = | 371 var categorySelected = |
373 this.allSites ? | 372 this.allSites ? |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 return false; | 445 return false; |
447 | 446 |
448 // The Block list is only shown when the category is set to Allow since it | 447 // The Block list is only shown when the category is set to Allow since it |
449 // is redundant to also list all the sites that are blocked. | 448 // is redundant to also list all the sites that are blocked. |
450 if (this.isAllowList_()) | 449 if (this.isAllowList_()) |
451 return true; | 450 return true; |
452 | 451 |
453 return toggleState; | 452 return toggleState; |
454 }, | 453 }, |
455 }); | 454 }); |
OLD | NEW |