1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cr.exportPath('settings');
/**
* All possible contentSettingsTypes that we currently support configuring in
* the UI. Both top-level categories and content settings that represent
* individual permissions under Site Details should appear here.
* This should be kept in sync with the |kContentSettingsTypeGroupNames| array
* in chrome/browser/ui/webui/site_settings_helper.cc
* @enum {string}
*/
settings.ContentSettingsTypes = {
COOKIES: 'cookies',
IMAGES: 'images',
JAVASCRIPT: 'javascript',
SOUND: 'sound',
PLUGINS: 'plugins', // AKA Flash.
POPUPS: 'popups',
GEOLOCATION: 'location',
NOTIFICATIONS: 'notifications',
MIC: 'media-stream-mic', // AKA Microphone.
CAMERA: 'media-stream-camera',
PROTOCOL_HANDLERS: 'register-protocol-handler',
UNSANDBOXED_PLUGINS: 'ppapi-broker',
AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads',
BACKGROUND_SYNC: 'background-sync',
MIDI_DEVICES: 'midi-sysex',
USB_DEVICES: 'usb-devices',
SERIAL_PORTS: 'serial-ports',
ZOOM_LEVELS: 'zoom-levels',
PROTECTED_CONTENT: 'protected-content',
ADS: 'ads',
CLIPBOARD: 'clipboard',
SENSORS: 'sensors',
PAYMENT_HANDLER: 'payment-handler',
BLUETOOTH_SCANNING: 'bluetooth-scanning',
NATIVE_FILE_SYSTEM_WRITE: 'native-file-system-write',
};
/**
* Contains the possible string values for a given ContentSettingsTypes.
* This should be kept in sync with the |ContentSetting| enum in
* components/content_settings/core/common/content_settings.h
* @enum {string}
*/
settings.ContentSetting = {
DEFAULT: 'default',
ALLOW: 'allow',
BLOCK: 'block',
ASK: 'ask',
SESSION_ONLY: 'session_only',
IMPORTANT_CONTENT: 'detect_important_content',
};
/**
* All possible ChooserTypes that we currently support configuring in the UI.
* This should be kept in sync with the |kChooserTypeGroupNames| array in
* chrome/browser/ui/webui/site_settings_helper.cc
* @enum {string}
*/
settings.ChooserType = {
NONE: '',
USB_DEVICES: 'usb-devices-data',
SERIAL_PORTS: 'serial-ports-data',
};
/**
* Contains the possible sources of a ContentSetting.
* This should be kept in sync with the |SiteSettingSource| enum in
* chrome/browser/ui/webui/site_settings_helper.h
* @enum {string}
*/
settings.SiteSettingSource = {
ADS_FILTER_BLACKLIST: 'ads-filter-blacklist',
DEFAULT: 'default',
// This source is for the Protected Media Identifier / Protected Content
// content setting only, which is only available on ChromeOS.
DRM_DISABLED: 'drm-disabled',
EMBARGO: 'embargo',
EXTENSION: 'extension',
INSECURE_ORIGIN: 'insecure-origin',
KILL_SWITCH: 'kill-switch',
POLICY: 'policy',
PREFERENCE: 'preference',
};
/**
* A category value to use for the All Sites list.
* @type {string}
*/
settings.ALL_SITES = 'all-sites';
/**
* An invalid subtype value.
* @type {string}
*/
settings.INVALID_CATEGORY_SUBTYPE = '';
/**
* Contains the possible record action types.
* This should be kept in sync with the |AllSitesAction| enum in
* chrome/browser/ui/webui/settings/site_settings_handler.cc
* @enum {number}
*/
settings.AllSitesAction = {
LOAD_PAGE: 0,
RESET_PERMISSIONS: 1,
CLEAR_DATA: 2,
ENTER_SITE_DETAILS: 3,
};
/**
* Contains the possible sort methods.
* @enum {string}
*/
settings.SortMethod = {
NAME: 'name',
MOST_VISITED: 'most-visited',
STORAGE: 'data-stored',
};
|