treib | ec8f330 | 2016-08-04 11:05:20 | [diff] [blame] | 1 | // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| 6 | #define COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| 7 | |
skym | 9e961db | 2016-09-19 19:02:08 | [diff] [blame] | 8 | #include <string> |
| 9 | |
treib | ec8f330 | 2016-08-04 11:05:20 | [diff] [blame] | 10 | #include "base/feature_list.h" |
| 11 | |
| 12 | namespace ntp_snippets { |
| 13 | |
pke | c4fe8dd | 2016-08-12 14:34:41 | [diff] [blame] | 14 | // Features to turn individual providers/categories on/off. |
treib | 5bc62a8 | 2016-08-09 11:30:15 | [diff] [blame] | 15 | extern const base::Feature kArticleSuggestionsFeature; |
pke | 2f529e9c | 2016-08-05 11:52:07 | [diff] [blame] | 16 | extern const base::Feature kBookmarkSuggestionsFeature; |
pke | c4fe8dd | 2016-08-12 14:34:41 | [diff] [blame] | 17 | extern const base::Feature kRecentOfflineTabSuggestionsFeature; |
| 18 | extern const base::Feature kDownloadSuggestionsFeature; |
vitaliii | 762478d | 2016-08-17 09:50:57 | [diff] [blame] | 19 | extern const base::Feature kPhysicalWebPageSuggestionsFeature; |
dgn | bb75020 | 2016-10-20 12:39:45 | [diff] [blame] | 20 | extern const base::Feature kForeignSessionsSuggestionsFeature;; |
treib | 5bc62a8 | 2016-08-09 11:30:15 | [diff] [blame] | 21 | |
peconn | 279b4d5 | 2016-08-12 18:42:01 | [diff] [blame] | 22 | // Feature to allow the 'save to offline' option to appear in the snippets |
| 23 | // context menu. |
| 24 | extern const base::Feature kSaveToOfflineFeature; |
| 25 | |
peconn | cde6298d | 2016-10-26 21:46:21 | [diff] [blame] | 26 | // Feature to allow offline badges to appear on snippets. |
| 27 | extern const base::Feature kOfflineBadgeFeature; |
| 28 | |
dgn | bb75020 | 2016-10-20 12:39:45 | [diff] [blame] | 29 | // Feature to allow dismissing sections. |
| 30 | extern const base::Feature kSectionDismissalFeature; |
| 31 | |
treib | 5bc62a8 | 2016-08-09 11:30:15 | [diff] [blame] | 32 | // Global toggle for the whole content suggestions feature. If this is set to |
| 33 | // false, all the per-provider features are ignored. |
treib | ec8f330 | 2016-08-04 11:05:20 | [diff] [blame] | 34 | extern const base::Feature kContentSuggestionsFeature; |
| 35 | |
dgn | 5684fd59 | 2016-11-04 15:26:56 | [diff] [blame^] | 36 | // Feature to enable the Fetch More action |
| 37 | extern const base::Feature kFetchMoreFeature; |
| 38 | |
skym | 9e961db | 2016-09-19 19:02:08 | [diff] [blame] | 39 | // Returns a feature param as an int instead of a string. |
| 40 | int GetParamAsInt(const base::Feature& feature, |
| 41 | const std::string& param_name, |
| 42 | int default_value); |
| 43 | |
treib | ec8f330 | 2016-08-04 11:05:20 | [diff] [blame] | 44 | } // namespace ntp_snippets |
| 45 | |
| 46 | #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |