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

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

Issue 2021343003: MD Site Settings: Add five new top level categories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback and add icons Created 4 years, 6 months 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.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 UNSANDBOXED_PLUGINS: 'ppapi-broker',
26 AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads',
27 KEYGEN: 'keygen',
28 BACKGROUND_SYNC: 'background-sync',
24 }; 29 };
25 30
26 /** 31 /**
27 * Contains the possible string values for a given contentSettingsType. 32 * Contains the possible string values for a given contentSettingsType.
28 * @enum {string} 33 * @enum {string}
29 */ 34 */
30 var PermissionValues = { 35 var PermissionValues = {
31 DEFAULT: 'default', 36 DEFAULT: 'default',
32 ALLOW: 'allow', 37 ALLOW: 'allow',
33 BLOCK: 'block', 38 BLOCK: 'block',
34 ASK: 'ask', 39 ASK: 'ask',
40 IMPORTANT_CONTENT: 'detect_important_content',
35 }; 41 };
36 42
37 /** 43 /**
38 * A category value to use for the All Sites list. 44 * A category value to use for the All Sites list.
39 * @const {number} 45 * @const {string}
40 */ 46 */
41 var ALL_SITES = -1; 47 var ALL_SITES = 'all-sites';
42 48
43 /** 49 /**
44 * An invalid subtype value. 50 * An invalid subtype value.
45 * @const {string} 51 * @const {string}
46 */ 52 */
47 var INVALID_CATEGORY_SUBTYPE = ''; 53 var INVALID_CATEGORY_SUBTYPE = '';
48 54
49 return { 55 return {
50 ContentSettingsTypes: ContentSettingsTypes, 56 ContentSettingsTypes: ContentSettingsTypes,
51 PermissionValues: PermissionValues, 57 PermissionValues: PermissionValues,
52 ALL_SITES: ALL_SITES, 58 ALL_SITES: ALL_SITES,
53 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE, 59 INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE,
54 }; 60 };
55 }); 61 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698