Chromium Code Reviews| 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-settings-page' is the settings page containing privacy and | 7 * 'settings-site-settings-page' is the settings page containing privacy and |
| 8 * security site settings. | 8 * security site settings. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| 11 is: 'settings-site-settings-page', | 11 is: 'settings-site-settings-page', |
| 12 | 12 |
| 13 behaviors: [SiteSettingsBehavior], | 13 behaviors: [SiteSettingsBehavior], |
| 14 | 14 |
| 15 properties: { | 15 properties: { |
| 16 /** @private */ | |
| 17 enableAllSitesAndDetails_: Boolean, | |
|
Dan Beam
2016/10/12 17:54:06
use value: function() { ... },
dschuyler
2016/10/13 01:23:07
Done.
| |
| 18 | |
| 16 /** | 19 /** |
| 17 * The category selected by the user. | 20 * The category selected by the user. |
| 18 */ | 21 */ |
| 19 categorySelected: { | 22 categorySelected: { |
| 20 type: String, | 23 type: String, |
| 21 notify: true, | 24 notify: true, |
| 22 }, | 25 }, |
| 23 }, | 26 }, |
| 24 | 27 |
| 25 ready: function() { | 28 ready: function() { |
| 29 this.enableAllSitesAndDetails_ = loadTimeData.getString( | |
| 30 'enableSiteSettingsAllSitesAndDetails'); | |
| 31 | |
| 26 this.ContentSettingsTypes = settings.ContentSettingsTypes; | 32 this.ContentSettingsTypes = settings.ContentSettingsTypes; |
| 27 this.ALL_SITES = settings.ALL_SITES; | 33 this.ALL_SITES = settings.ALL_SITES; |
| 28 | 34 |
| 29 // Look up the default value for each category and show it. | 35 // Look up the default value for each category and show it. |
| 30 this.setDefaultValue_(this.ContentSettingsTypes.AUTOMATIC_DOWNLOADS, | 36 this.setDefaultValue_(this.ContentSettingsTypes.AUTOMATIC_DOWNLOADS, |
| 31 '#automaticDownloads'); | 37 '#automaticDownloads'); |
| 32 this.setDefaultValue_(this.ContentSettingsTypes.BACKGROUND_SYNC, | 38 this.setDefaultValue_(this.ContentSettingsTypes.BACKGROUND_SYNC, |
| 33 '#backgroundSync'); | 39 '#backgroundSync'); |
| 34 this.setDefaultValue_(this.ContentSettingsTypes.CAMERA, '#camera'); | 40 this.setDefaultValue_(this.ContentSettingsTypes.CAMERA, '#camera'); |
| 35 this.setDefaultValue_(this.ContentSettingsTypes.COOKIES, '#cookies'); | 41 this.setDefaultValue_(this.ContentSettingsTypes.COOKIES, '#cookies'); |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 64 * @param {!Event} event The tap event. | 70 * @param {!Event} event The tap event. |
| 65 */ | 71 */ |
| 66 onTapCategory: function(event) { | 72 onTapCategory: function(event) { |
| 67 var category = event.currentTarget.getAttribute('category'); | 73 var category = event.currentTarget.getAttribute('category'); |
| 68 if (category == settings.ALL_SITES) | 74 if (category == settings.ALL_SITES) |
| 69 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); | 75 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); |
| 70 else | 76 else |
| 71 settings.navigateTo(this.computeCategoryRoute(category)); | 77 settings.navigateTo(this.computeCategoryRoute(category)); |
| 72 }, | 78 }, |
| 73 }); | 79 }); |
| OLD | NEW |