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 * All possible contentSettingsTypes that we currently support configuring in | 7 * All possible contentSettingsTypes that we currently support configuring in |
8 * the UI. Both top-level categories and content settings that represent | 8 * the UI. Both top-level categories and content settings that represent |
9 * individual permissions under Site Details should appear here. This is a | 9 * individual permissions under Site Details should appear here. This is a |
10 * subset of the constants found under content_setttings_types.h and the | 10 * subset of the constants found in site_settings_helper.cc and the values |
11 * values should be kept in sync. | 11 * should be kept in sync. |
12 * @enum {number} | 12 * @enum {string} |
13 */ | 13 */ |
14 var ContentSettingsTypes = { | 14 var ContentSettingsTypes = { |
15 COOKIES: 0, | 15 COOKIES: 'cookies', |
16 IMAGES: 1, | 16 IMAGES: 'images', |
17 JAVASCRIPT: 2, | 17 JAVASCRIPT: 'javascript', |
18 POPUPS: 4, | 18 PLUGINS: 'plugins', |
19 GEOLOCATION: 5, | 19 POPUPS: 'popups', |
20 NOTIFICATIONS: 6, | 20 GEOLOCATION: 'location', |
21 FULLSCREEN: 8, | 21 NOTIFICATIONS: 'notifications', |
22 MIC: 12, | 22 FULLSCREEN: 'fullscreen', |
23 CAMERA: 13, | 23 MIC: 'media-stream-mic', |
| 24 CAMERA: 'media-stream-camera', |
| 25 // A.k.a CONTENT_SETTINGS_TYPE_PPAPI_BROKER. |
| 26 UNSANDBOXED_PLUGINS: 'ppapi-broker', |
| 27 AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads', |
| 28 KEYGEN: 'keygen', |
| 29 BACKGROUND_SYNC: 'background-sync', |
24 }; | 30 }; |
25 | 31 |
26 /** | 32 /** |
27 * Contains the possible string values for a given contentSettingsType. | 33 * Contains the possible string values for a given contentSettingsType. |
28 * @enum {string} | 34 * @enum {string} |
29 */ | 35 */ |
30 var PermissionValues = { | 36 var PermissionValues = { |
31 DEFAULT: 'default', | 37 DEFAULT: 'default', |
32 ALLOW: 'allow', | 38 ALLOW: 'allow', |
33 BLOCK: 'block', | 39 BLOCK: 'block', |
34 ASK: 'ask', | 40 ASK: 'ask', |
| 41 IMPORTANT_CONTENT: 'detect_important_content', |
35 }; | 42 }; |
36 | 43 |
37 /** | 44 /** |
38 * A category value to use for the All Sites list. | 45 * A category value to use for the All Sites list. |
39 * @const {number} | 46 * @const {number} |
40 */ | 47 */ |
41 var ALL_SITES = -1; | 48 var ALL_SITES = -1; |
42 | 49 |
43 /** | 50 /** |
44 * An invalid subtype value. | 51 * An invalid subtype value. |
45 * @const {string} | 52 * @const {string} |
46 */ | 53 */ |
47 var INVALID_CATEGORY_SUBTYPE = ''; | 54 var INVALID_CATEGORY_SUBTYPE = ''; |
48 | 55 |
49 return { | 56 return { |
50 ContentSettingsTypes: ContentSettingsTypes, | 57 ContentSettingsTypes: ContentSettingsTypes, |
51 PermissionValues: PermissionValues, | 58 PermissionValues: PermissionValues, |
52 ALL_SITES: ALL_SITES, | 59 ALL_SITES: ALL_SITES, |
53 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE, | 60 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE, |
54 }; | 61 }; |
55 }); | 62 }); |
OLD | NEW |