| 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 Behavior common to Site Settings classes. | 6 * @fileoverview Behavior common to Site Settings classes. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** @polymerBehavior */ | 9 /** @polymerBehavior */ |
| 10 var SiteSettingsBehaviorImpl = { | 10 var SiteSettingsBehaviorImpl = { |
| 11 properties: { |
| 12 /** |
| 13 * The ID of the category this element is displaying data for. |
| 14 */ |
| 15 category: { |
| 16 type: Number, |
| 17 value: settings.ContentSettingsTypes.GEOLOCATION |
| 18 }, |
| 19 |
| 20 }, |
| 21 |
| 11 /** | 22 /** |
| 12 * Returns whether the category default is set to enabled or not. | 23 * Returns whether the category default is set to enabled or not. |
| 13 * @param {number} category The category to check. | 24 * @param {number} category The category to check. |
| 14 * @return {boolean} True if the category default is set to enabled. | 25 * @return {boolean} True if the category default is set to enabled. |
| 15 * @protected | 26 * @protected |
| 16 */ | 27 */ |
| 17 isCategoryAllowed: function(category) { | 28 isCategoryAllowed: function(category) { |
| 18 var pref = this.getPref(this.computeCategoryPrefName(category)); | 29 var pref = this.getPref(this.computeCategoryPrefName(category)); |
| 19 | 30 |
| 20 // FullScreen is Allow vs. Ask. | 31 // FullScreen is Allow vs. Ask. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 loadTimeData.getString('siteSettingsBlocked'); | 192 loadTimeData.getString('siteSettingsBlocked'); |
| 182 default: | 193 default: |
| 183 assertNotReached(); | 194 assertNotReached(); |
| 184 return ''; | 195 return ''; |
| 185 } | 196 } |
| 186 }, | 197 }, |
| 187 }; | 198 }; |
| 188 | 199 |
| 189 /** @polymerBehavior */ | 200 /** @polymerBehavior */ |
| 190 var SiteSettingsBehavior = [PrefsBehavior, SiteSettingsBehaviorImpl]; | 201 var SiteSettingsBehavior = [PrefsBehavior, SiteSettingsBehaviorImpl]; |
| OLD | NEW |