Fix emulator build error
[platform/framework/web/chromium-efl.git] / components / search / ntp_features.h
1 // Copyright 2018 The Chromium Authors
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_SEARCH_NTP_FEATURES_H_
6 #define COMPONENTS_SEARCH_NTP_FEATURES_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/feature_list.h"
12 #include "base/metrics/field_trial_params.h"
13
14 namespace base {
15 class TimeDelta;
16 }  // namespace base
17
18 namespace ntp_features {
19
20 // The features should be documented alongside the definition of their values in
21 // the .cc file.
22
23 BASE_DECLARE_FEATURE(kConfirmSuggestionRemovals);
24 BASE_DECLARE_FEATURE(kCacheOneGoogleBar);
25 BASE_DECLARE_FEATURE(kCustomizeChromeColorExtraction);
26 BASE_DECLARE_FEATURE(kCustomizeChromeSidePanelExtensionsCard);
27 BASE_DECLARE_FEATURE(kCustomizeChromeWallpaperSearch);
28 BASE_DECLARE_FEATURE(kCwsDarkLogo);
29 BASE_DECLARE_FEATURE(kDismissPromos);
30 BASE_DECLARE_FEATURE(kIframeOneGoogleBar);
31 BASE_DECLARE_FEATURE(kOneGoogleBarModalOverlays);
32 BASE_DECLARE_FEATURE(kRealboxCr23All);
33 BASE_DECLARE_FEATURE(kRealboxMatchOmniboxTheme);
34 BASE_DECLARE_FEATURE(kRealboxMatchSearchboxTheme);
35 BASE_DECLARE_FEATURE(kRealboxUseGoogleGIcon);
36 BASE_DECLARE_FEATURE(kRealboxWidthBehavior);
37 BASE_DECLARE_FEATURE(kRealboxIsTall);
38 BASE_DECLARE_FEATURE(kNtpAlphaBackgroundCollections);
39 BASE_DECLARE_FEATURE(kNtpBackgroundImageErrorDetection);
40 BASE_DECLARE_FEATURE(kNtpChromeCartModule);
41 BASE_DECLARE_FEATURE(kNtpDriveModule);
42 BASE_DECLARE_FEATURE(kNtpDriveModuleSegmentation);
43 BASE_DECLARE_FEATURE(kNtpDriveModuleShowSixFiles);
44 #if !defined(OFFICIAL_BUILD)
45 BASE_DECLARE_FEATURE(kNtpDummyModules);
46 #endif
47 BASE_DECLARE_FEATURE(kNtpComprehensiveTheming);
48 BASE_DECLARE_FEATURE(kNtpComprehensiveThemeRealbox);
49 BASE_DECLARE_FEATURE(kNtpLogo);
50 BASE_DECLARE_FEATURE(kNtpReducedLogoSpace);
51 BASE_DECLARE_FEATURE(kNtpMiddleSlotPromo);
52 BASE_DECLARE_FEATURE(kNtpMiddleSlotPromoDismissal);
53 BASE_DECLARE_FEATURE(kNtpModulesLoadTimeoutMilliseconds);
54 BASE_DECLARE_FEATURE(kNtpWideModules);
55 BASE_DECLARE_FEATURE(kNtpModulesOrder);
56 BASE_DECLARE_FEATURE(kNtpModulesOverflowScrollbar);
57 BASE_DECLARE_FEATURE(kNtpModulesDragAndDrop);
58 BASE_DECLARE_FEATURE(kNtpModulesFirstRunExperience);
59 BASE_DECLARE_FEATURE(kNtpModulesLoad);
60 BASE_DECLARE_FEATURE(kNtpModulesRedesigned);
61 BASE_DECLARE_FEATURE(kNtpMostVisitedReflowOnOverflow);
62 BASE_DECLARE_FEATURE(kNtpPhotosModule);
63 BASE_DECLARE_FEATURE(kNtpPhotosModuleSoftOptOut);
64 BASE_DECLARE_FEATURE(kNtpPhotosModuleCustomizedOptInTitle);
65 BASE_DECLARE_FEATURE(kNtpPhotosModuleCustomizedOptInArtWork);
66 BASE_DECLARE_FEATURE(kNtpPhotosModuleSplitSvgOptInArtWork);
67 BASE_DECLARE_FEATURE(kNtpFeedModule);
68 BASE_DECLARE_FEATURE(kNtpOneGoogleBar);
69 BASE_DECLARE_FEATURE(kNtpRealboxLensSearch);
70 BASE_DECLARE_FEATURE(kNtpLensDirectUpload);
71 BASE_DECLARE_FEATURE(kNtpRecipeTasksModule);
72 BASE_DECLARE_FEATURE(kNtpSafeBrowsingModule);
73 BASE_DECLARE_FEATURE(kNtpShortcuts);
74 BASE_DECLARE_FEATURE(kNtpSingleRowShortcuts);
75 BASE_DECLARE_FEATURE(kNtpHandleMostVisitedNavigationExplicitly);
76 BASE_DECLARE_FEATURE(kNtpHistoryClustersModule);
77 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleBeginTimeDuration);
78 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleMinimumVisitsRequired);
79 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleMinimumImagesRequired);
80 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleCategories);
81 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleLoad);
82 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleMaxClusters);
83 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleSuggestionChipHeader);
84 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleTextOnly);
85 BASE_DECLARE_FEATURE(kNtpModulesHeaderIcon);
86 BASE_DECLARE_FEATURE(kNtpChromeCartInHistoryClusterModule);
87 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleUseModelRanking);
88 BASE_DECLARE_FEATURE(kNtpChromeCartHistoryClusterCoexist);
89 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleFetchClustersUntilExhausted);
90 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleIncludeSyncedVisits);
91 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleEnableContentClustering);
92 BASE_DECLARE_FEATURE(kNtpHistoryClustersModuleDiscounts);
93 BASE_DECLARE_FEATURE(kNtpTabResumptionModule);
94
95 // Parameter for controlling the luminosity difference for NTP elements on light
96 // backgrounds.
97 extern const base::FeatureParam<double>
98     kNtpElementLuminosityChangeForLightBackgroundParam;
99
100 // Parameter for controlling the luminosity difference for NTP elements on dark
101 // backgrounds.
102 extern const base::FeatureParam<double>
103     kNtpElementLuminosityChangeForDarkBackgroundParam;
104
105 // Parameter determining the module load timeout.
106 extern const char kNtpModulesLoadTimeoutMillisecondsParam[];
107 // Parameter determining the module order.
108 extern const char kNtpModulesOrderParam[];
109 // Parameter determining the type of cart data used to render module.
110 extern const char kNtpChromeCartModuleDataParam[];
111 // Parameter for enabling the abandoned cart discount.
112 extern const char kNtpChromeCartModuleAbandonedCartDiscountParam[];
113 // Parameter for enabling the abandoned cart discount with utm_source tag to
114 // indicate the feature state.
115 extern const char kNtpChromeCartModuleAbandonedCartDiscountUseUtmParam[];
116 // Parameter for enabling the cart heuristics improvement.
117 extern const char kNtpChromeCartModuleHeuristicsImprovementParam[];
118 // Parameter for enabling coupons on the Cart module.
119 extern const char kNtpChromeCartModuleCouponParam[];
120 // Parameter determining the type of Drive data to render.
121 extern const char kNtpDriveModuleDataParam[];
122 // Parameter for enabling the Drive module for managed users only.
123 extern const char kNtpDriveModuleManagedUsersOnlyParam[];
124 // Parameter determining the max age in seconds of the cache for drive data.
125 extern const char kNtpDriveModuleCacheMaxAgeSParam[];
126 // Parameter for communicating the experiment group of the Drive module
127 // experiment.
128 extern const char kNtpDriveModuleExperimentGroupParam[];
129 // Parameter determining the fake data to request to surface a particular
130 // visual layout.
131 extern const char kNtpHistoryClustersModuleDataParam[];
132 // Parameter determining the fake data to request to surface a particular
133 // cart tile layout in history cluster module.
134 extern const char kNtpChromeCartInHistoryClustersModuleDataParam[];
135 // Parameter determining the type of middle slot promo data to render.
136 extern const char kNtpMiddleSlotPromoDismissalParam[];
137 // Parameter determining the modules that are eligigle for HATS.
138 extern const char kNtpModulesEligibleForHappinessTrackingSurveyParam[];
139 // Parameter determining the type of Photos data to render.
140 extern const char kNtpPhotosModuleDataParam[];
141 // Parameter determining the art work in opt-in card.
142 extern const char kNtpPhotosModuleOptInArtWorkParam[];
143 // Parameter determining the title for the opt-in card.
144 extern const char kNtpPhotosModuleOptInTitleParam[];
145 // Parameter determining the number of times a module is shown to a user
146 // before cooldown starts.
147 extern const char kNtpSafeBrowsingModuleCountMaxParam[];
148 // Parameter determining the cooldown period (in days) for a target user.
149 extern const char kNtpSafeBrowsingModuleCooldownPeriodDaysParam[];
150 // Parameter determining the variation of the omnibox theme matching.
151 extern const char kRealboxMatchOmniboxThemeVariantParam[];
152 // Parameter determining the type of recipe data to request.
153 extern const char kNtpRecipeTasksModuleDataParam[];
154 // Parameter determining the max age in seconds of the cache for recipe tasks
155 // data.
156 extern const char kNtpRecipeTasksModuleCacheMaxAgeSParam[];
157 // Parameter for communicating the experiment group of the recipe tasks module
158 // experiment.
159 extern const char kNtpRecipeTasksModuleExperimentGroupParam[];
160 // Parameter for determining the maximum number of hours to look back to show a
161 // history cluster.
162 extern const char kNtpHistoryClustersModuleBeginTimeDurationHoursParam[];
163 // Parameter for determining the minimum number of visits that are required in
164 // order to show a history cluster.
165 extern const char kNtpHistoryClustersModuleMinimumVisitsRequiredParam[];
166 // Parameter for determining the minimum number of visits with an image that are
167 // required in order to show a history cluster.
168 extern const char kNtpHistoryClustersModuleMinimumImagesRequiredParam[];
169 // Parameter for determining the categories a history cluster must fall into to
170 // be shown.
171 extern const char kNtpHistoryClustersModuleCategoriesAllowlistParam[];
172 // Parameter for determining the categories a history cluster must not fall into
173 // to be shown.
174 extern const char kNtpHistoryClustersModuleCategoriesBlocklistParam[];
175 // Parameter for determining the categories a history cluster falls into to be
176 // boosted for showing on the New Tab Page.
177 extern const char kNtpHistoryClustersModuleCategoriesBoostlistParam[];
178 // Parameter for setting the maximum number of candidate clusters for the
179 // History Clusters Service to return.
180 extern const char kNtpHistoryClustersModuleMaxClustersParam[];
181 extern const char kNtpRealboxWidthBehaviorParam[];
182
183 // Returns the timeout after which the load of a module should be aborted.
184 base::TimeDelta GetModulesLoadTimeout();
185
186 // Returns the maximum number of columns to show on the redesigned modules UI
187 // experience.
188 int GetModulesMaxColumnCount();
189
190 // Returns the maximum number of instances to render for a given module when the
191 // module has loaded with other modules. A sentinel value of -1 implies there is
192 // no limit.
193 int GetMultipleLoadedModulesMaxModuleInstanceCount();
194
195 // Returns a list of module IDs ordered by how they should appear on the NTP.
196 std::vector<std::string> GetModulesOrder();
197 }  // namespace ntp_features
198
199 #endif  // COMPONENTS_SEARCH_NTP_FEATURES_H_