OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ |
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // TODO(raymes): Deprecated. See crbug.com/681709. Remove after M60. | 47 // TODO(raymes): Deprecated. See crbug.com/681709. Remove after M60. |
48 CONTENT_SETTINGS_TYPE_PROMPT_NO_DECISION_COUNT, | 48 CONTENT_SETTINGS_TYPE_PROMPT_NO_DECISION_COUNT, |
49 CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO, | 49 CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO, |
50 CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA, | 50 CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA, |
51 CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, | 51 CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, |
52 | 52 |
53 // This is special-cased in the permissions layer to always allow, and as | 53 // This is special-cased in the permissions layer to always allow, and as |
54 // such doesn't have associated prefs data. | 54 // such doesn't have associated prefs data. |
55 CONTENT_SETTINGS_TYPE_MIDI, | 55 CONTENT_SETTINGS_TYPE_MIDI, |
56 | 56 |
| 57 // Sensors Permissions. |
| 58 CONTENT_SETTINGS_TYPE_AMBIENT_LIGHT_SENSOR, |
| 59 CONTENT_SETTINGS_TYPE_MAGNETOMETER, |
| 60 CONTENT_SETTINGS_TYPE_ORIENTATION_SENSOR, |
| 61 // Auto grant. Always allow. |
| 62 CONTENT_SETTINGS_TYPE_ACCELEROMETER, |
| 63 CONTENT_SETTINGS_TYPE_GYROSCOPE, |
| 64 |
57 // This is only here temporarily and will be removed when we further unify | 65 // This is only here temporarily and will be removed when we further unify |
58 // it with notifications, see crbug.com/563297. No prefs data is stored for | 66 // it with notifications, see crbug.com/563297. No prefs data is stored for |
59 // this content type, we instead share values with NOTIFICATIONS. | 67 // this content type, we instead share values with NOTIFICATIONS. |
60 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, | 68 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, |
61 | 69 |
62 // This content setting type is for caching password protection service's | 70 // This content setting type is for caching password protection service's |
63 // verdicts of each origin. | 71 // verdicts of each origin. |
64 CONTENT_SETTINGS_TYPE_PASSWORD_PROTECTION, | 72 CONTENT_SETTINGS_TYPE_PASSWORD_PROTECTION, |
65 | 73 |
66 // WARNING: This enum is going to be removed soon. Do not depend on NUM_TYPES. | 74 // WARNING: This enum is going to be removed soon. Do not depend on NUM_TYPES. |
67 CONTENT_SETTINGS_NUM_TYPES_DO_NOT_USE, | 75 CONTENT_SETTINGS_NUM_TYPES_DO_NOT_USE, |
68 }; | 76 }; |
69 | 77 |
70 struct ContentSettingsTypeHash { | 78 struct ContentSettingsTypeHash { |
71 std::size_t operator()(ContentSettingsType type) const { | 79 std::size_t operator()(ContentSettingsType type) const { |
72 return static_cast<std::size_t>(type); | 80 return static_cast<std::size_t>(type); |
73 } | 81 } |
74 }; | 82 }; |
75 | 83 |
76 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ | 84 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ |
OLD | NEW |