Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: chrome/browser/resources/settings/site_settings/constants.js

Issue 2468363005: [MD settings] show blocked sites even when category is blocked (Closed)
Patch Set: unit test changes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.exportPath('settings');
6 /**
7 * All possible contentSettingsTypes that we currently support configuring in
8 * the UI. Both top-level categories and content settings that represent
9 * individual permissions under Site Details should appear here. This is a
10 * subset of the constants found in site_settings_helper.cc and the values
11 * should be kept in sync.
12 * @enum {string}
13 */
14 var ContentSettingsTypes = {
15 COOKIES: 'cookies',
16 IMAGES: 'images',
17 JAVASCRIPT: 'javascript',
18 PLUGINS: 'plugins',
19 POPUPS: 'popups',
20 GEOLOCATION: 'location',
21 NOTIFICATIONS: 'notifications',
22 FULLSCREEN: 'fullscreen',
23 MIC: 'media-stream-mic',
24 CAMERA: 'media-stream-camera',
25 PROTOCOL_HANDLERS: 'register-protocol-handler',
26 UNSANDBOXED_PLUGINS: 'ppapi-broker',
27 AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads',
28 KEYGEN: 'keygen',
29 BACKGROUND_SYNC: 'background-sync',
30 USB_DEVICES: 'usb-chooser-data',
31 ZOOM_LEVELS: 'zoom-levels',
32 };
33 6
34 /** 7 /**
35 * Contains the possible string values for a given contentSettingsType. 8 * All possible contentSettingsTypes that we currently support configuring in
36 * @enum {string} 9 * the UI. Both top-level categories and content settings that represent
37 */ 10 * individual permissions under Site Details should appear here. This is a
38 var PermissionValues = { 11 * subset of the constants found in site_settings_helper.cc and the values
39 DEFAULT: 'default', 12 * should be kept in sync.
40 ALLOW: 'allow', 13 * @enum {string}
41 BLOCK: 'block', 14 */
42 ASK: 'ask', 15 settings.ContentSettingsTypes = {
43 SESSION_ONLY: 'session_only', 16 COOKIES: 'cookies',
44 IMPORTANT_CONTENT: 'detect_important_content', 17 IMAGES: 'images',
45 }; 18 JAVASCRIPT: 'javascript',
19 PLUGINS: 'plugins',
20 POPUPS: 'popups',
21 GEOLOCATION: 'location',
22 NOTIFICATIONS: 'notifications',
23 FULLSCREEN: 'fullscreen',
24 MIC: 'media-stream-mic',
25 CAMERA: 'media-stream-camera',
26 PROTOCOL_HANDLERS: 'register-protocol-handler',
27 UNSANDBOXED_PLUGINS: 'ppapi-broker',
28 AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads',
29 KEYGEN: 'keygen',
30 BACKGROUND_SYNC: 'background-sync',
31 USB_DEVICES: 'usb-chooser-data',
32 ZOOM_LEVELS: 'zoom-levels',
33 };
46 34
47 /** 35 /**
48 * A category value to use for the All Sites list. 36 * Contains the possible string values for a given contentSettingsType.
49 * @const {string} 37 * @enum {string}
50 */ 38 *
51 var ALL_SITES = 'all-sites'; 39 * TODO(dschuyler): This should be rename as ContentSetting to maintain
40 * nomenclature with C++.
41 */
42 settings.PermissionValues = {
43 DEFAULT: 'default',
44 ALLOW: 'allow',
45 BLOCK: 'block',
46 ASK: 'ask',
47 SESSION_ONLY: 'session_only',
48 IMPORTANT_CONTENT: 'detect_important_content',
49 };
52 50
53 /** 51 /**
54 * An invalid subtype value. 52 * A category value to use for the All Sites list.
55 * @const {string} 53 * @const {string}
56 */ 54 */
57 var INVALID_CATEGORY_SUBTYPE = ''; 55 settings.ALL_SITES = 'all-sites';
58 56
59 return { 57 /**
60 ContentSettingsTypes: ContentSettingsTypes, 58 * An invalid subtype value.
61 PermissionValues: PermissionValues, 59 * @const {string}
62 ALL_SITES: ALL_SITES, 60 */
63 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE, 61 settings.INVALID_CATEGORY_SUBTYPE = '';
64 };
65 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698