Chromium Code Reviews| Index: components/ntp_snippets/features.h |
| diff --git a/components/ntp_snippets/features.h b/components/ntp_snippets/features.h |
| index 8832aed550217336f78ebaea7414d73046e12712..1176d24d137dd9c271e4928da9a554500fa08974 100644 |
| --- a/components/ntp_snippets/features.h |
| +++ b/components/ntp_snippets/features.h |
| @@ -18,6 +18,9 @@ class Clock; |
| namespace ntp_snippets { |
| +// Null-terminated list of all features related to content suggestions. |
| +extern const base::Feature*(kAllFeatures[]); |
|
dgn
2017/04/19 12:53:26
nit: add a big comment here or at the beginning of
sfiera
2017/04/19 13:04:53
I lengthened it here, but I'm not sure it's flashy
|
| + |
| // Features to turn individual providers/categories on/off. |
| // TODO(jkrcal): Rename to kRemoteSuggestionsFeature. |
| extern const base::Feature kArticleSuggestionsFeature; |
| @@ -72,6 +75,39 @@ enum class CategoryOrderChoice { |
| // Returns which category order to use according to kCategoryOrder feature. |
| CategoryOrderChoice GetSelectedCategoryOrder(); |
| +// Enables and configures notifications for content suggestions on Android. |
| +extern const base::Feature kNotificationsFeature; |
| + |
| +// An integer. The priority of the notification, ranging from -2 (PRIORITY_MIN) |
| +// to 2 (PRIORITY_MAX). Vibrates and makes sound if >= 0. |
| +extern const char kNotificationsPriorityParam[]; |
| +constexpr int kNotificationsDefaultPriority = -1; |
| + |
| +// "publisher": use article's publisher as notification's text (default). |
| +// "snippet": use article's snippet as notification's text. |
| +// "and_more": use "From $1. Read this article and $2 more." as text. |
| +extern const char kNotificationsTextParam[]; |
| +extern const char kNotificationsTextValuePublisher[]; |
| +extern const char kNotificationsTextValueSnippet[]; |
| +extern const char kNotificationsTextValueAndMore[]; |
| + |
| +// "true": when Chrome becomes frontmost, leave notifications open. |
| +// "false": automatically dismiss notification when Chrome becomes frontmost. |
| +extern const char kNotificationsKeepWhenFrontmostParam[]; |
| + |
| +// "true": notifications link to chrome://newtab, with appropriate text. |
| +// "false": notifications link to URL of notifying article. |
| +extern const char kNotificationsOpenToNTPParam[]; |
| + |
| +// An integer. The maximum number of notifications that will be shown in 1 day. |
| +extern const char kNotificationsDailyLimit[]; |
| +constexpr int kNotificationsDefaultDailyLimit = 1; |
| + |
| +// An integer. The number of notifications that can be ignored. If the user |
| +// ignores this many notifications or more, we stop sending them. |
| +extern const char kNotificationsIgnoredLimitParam[]; |
| +constexpr int kNotificationsIgnoredDefaultLimit = 3; |
| + |
| } // namespace ntp_snippets |
| #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |