| 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 cr.define('settings', function() { | 5 cr.define('settings', function() { |
| 6 /** | 6 /** |
| 7 * The possible contentSettingsTypes (the ones we currently support | 7 * The possible contentSettingsTypes (the ones we currently support |
| 8 * configuring in the UI). This is a subset of the constants found under | 8 * configuring in the UI). This is a subset of the constants found under |
| 9 * content_setttings_types.h and the values should be kept in sync. | 9 * content_setttings_types.h and the values should be kept in sync. |
| 10 * TODO(finnur): When all categories have been implemented we can just | 10 * TODO(finnur): When all categories have been implemented we can just |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * Contains the possible values for a given contentSettingsType. | 27 * Contains the possible values for a given contentSettingsType. |
| 28 * @enum {number} | 28 * @enum {number} |
| 29 */ | 29 */ |
| 30 var PermissionValues = { | 30 var PermissionValues = { |
| 31 ALLOW: 1, | 31 ALLOW: 1, |
| 32 BLOCK: 2, | 32 BLOCK: 2, |
| 33 ASK: 3, | 33 ASK: 3, |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 /** | 36 /** |
| 37 * Contains the possible string values for a given contentSettingsType. |
| 38 * @enum {string} |
| 39 */ |
| 40 var PermissionStringValues = { |
| 41 ALLOW: 'allow', |
| 42 BLOCK: 'block', |
| 43 }; |
| 44 |
| 45 /** |
| 37 * A category value to use for the All Sites list. | 46 * A category value to use for the All Sites list. |
| 38 * @const {number} | 47 * @const {number} |
| 39 */ | 48 */ |
| 40 var ALL_SITES = -1; | 49 var ALL_SITES = -1; |
| 41 | 50 |
| 42 /** | 51 /** |
| 43 * An invalid subtype value. | 52 * An invalid subtype value. |
| 44 * @const {number} | 53 * @const {number} |
| 45 */ | 54 */ |
| 46 var INVALID_CATEGORY_SUBTYPE = -1; | 55 var INVALID_CATEGORY_SUBTYPE = -1; |
| 47 | 56 |
| 48 return { | 57 return { |
| 49 ContentSettingsTypes: ContentSettingsTypes, | 58 ContentSettingsTypes: ContentSettingsTypes, |
| 50 PermissionValues: PermissionValues, | 59 PermissionValues: PermissionValues, |
| 60 PermissionStringValues: PermissionStringValues, |
| 51 ALL_SITES: ALL_SITES, | 61 ALL_SITES: ALL_SITES, |
| 52 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE, | 62 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE, |
| 53 }; | 63 }; |
| 54 }); | 64 }); |
| OLD | NEW |