Chromium Code Reviews| Index: components/content_settings/core/common/content_settings_types.h |
| diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h |
| index e89357643200cd9d92965054159b215287ab04c1..dfe967096951814e9be0609bf59e196054a048c7 100644 |
| --- a/components/content_settings/core/common/content_settings_types.h |
| +++ b/components/content_settings/core/common/content_settings_types.h |
| @@ -5,6 +5,8 @@ |
| #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ |
| #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ |
| +#include <cstddef> |
| + |
| #include "build/build_config.h" |
| // A particular type of content to care about. We give the user various types |
| @@ -14,6 +16,10 @@ |
| // content_settings.cc as well. |
| // A Java counterpart will be generated for this enum. |
| // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser |
| + |
| +// Permission types exposed to the web platform via navigator.permissions are |
| +// also defined in the PermissionType enum. The PermissionType enum should be |
| +// used within content/ but not within chrome/. |
|
raymes
2017/02/09 00:39:57
Unfortunately this might not be the right place (t
Timothy Loh
2017/02/10 07:25:38
Done.
|
| enum ContentSettingsType { |
| // "DEFAULT" is only used as an argument to the Content Settings Window |
| // opener; there it means "whatever was last shown". |
| @@ -47,8 +53,18 @@ enum ContentSettingsType { |
| CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO, |
| CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA, |
| + // This is only here temporarily and will be removed when we further unify |
| + // it with notifications, see crbug.com/563297. |
|
raymes
2017/02/09 00:39:57
nit: add a note that no data is stored in this con
Timothy Loh
2017/02/10 07:25:38
Done.
|
| + CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, |
| + |
| // WARNING: This enum is going to be removed soon. Do not depend on NUM_TYPES. |
| CONTENT_SETTINGS_NUM_TYPES_DO_NOT_USE, |
| }; |
| +struct ContentSettingsTypeHash { |
| + std::size_t operator()(ContentSettingsType type) const { |
| + return static_cast<std::size_t>(type); |
| + } |
| +}; |
| + |
| #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ |