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 */ | 16 /** @private */ |
17 enableSiteSettings_: { | 17 enableSiteSettings_: { |
18 type: Boolean, | 18 type: Boolean, |
19 value: function() { | 19 value: function() { |
20 return loadTimeData.getBoolean('enableSiteSettings'); | 20 return loadTimeData.getBoolean('enableSiteSettings'); |
21 }, | 21 }, |
22 }, | 22 }, |
23 | |
24 /** | |
25 * The category selected by the user. | |
26 */ | |
27 categorySelected: { | |
28 type: String, | |
29 notify: true, | |
30 }, | |
31 }, | 23 }, |
32 | 24 |
33 ready: function() { | 25 ready: function() { |
34 this.ContentSettingsTypes = settings.ContentSettingsTypes; | 26 this.ContentSettingsTypes = settings.ContentSettingsTypes; |
35 this.ALL_SITES = settings.ALL_SITES; | 27 this.ALL_SITES = settings.ALL_SITES; |
36 | 28 |
37 // Look up the default value for each category and show it. | 29 // Look up the default value for each category and show it. |
38 this.setDefaultValue_(this.ContentSettingsTypes.AUTOMATIC_DOWNLOADS, | 30 this.setDefaultValue_(this.ContentSettingsTypes.AUTOMATIC_DOWNLOADS, |
39 '#automaticDownloads'); | 31 '#automaticDownloads'); |
40 this.setDefaultValue_(this.ContentSettingsTypes.BACKGROUND_SYNC, | 32 this.setDefaultValue_(this.ContentSettingsTypes.BACKGROUND_SYNC, |
(...skipping 28 matching lines...) Expand all Loading... |
69 /** | 61 /** |
70 * Navigate to the route specified in the event dataset. | 62 * Navigate to the route specified in the event dataset. |
71 * @param {!Event} event The tap event. | 63 * @param {!Event} event The tap event. |
72 * @private | 64 * @private |
73 */ | 65 */ |
74 onTapNavigate_: function(event) { | 66 onTapNavigate_: function(event) { |
75 var dataSet = /** @type {{route: string}} */(event.currentTarget.dataset); | 67 var dataSet = /** @type {{route: string}} */(event.currentTarget.dataset); |
76 settings.navigateTo(settings.Route[dataSet.route]); | 68 settings.navigateTo(settings.Route[dataSet.route]); |
77 }, | 69 }, |
78 }); | 70 }); |
OLD | NEW |