Commit 4f00830f authored by Ana Salazar's avatar Ana Salazar Committed by Commit Bot

Cros: Add feature flag for new drag spec

The new feature will enable the new app dragging functionality in the
launcher. When the user drags an app within the launcher, the apps grid
pages will be scaled down to 84% and will show a background card to show
them in a more modular way.

Bug: 996822
Change-Id: I993693f7ada613760384c981792b57e08ac8f3dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159756Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Ana Salazar <anasalazar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761125}
parent cd63765d
...@@ -60,6 +60,8 @@ const base::Feature kEnableExactMatchForNonLatinLocale{ ...@@ -60,6 +60,8 @@ const base::Feature kEnableExactMatchForNonLatinLocale{
"EnableExactMatchForNonLatinLocale", base::FEATURE_ENABLED_BY_DEFAULT}; "EnableExactMatchForNonLatinLocale", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kEnableAggregatedMlSearchRanking{ const base::Feature kEnableAggregatedMlSearchRanking{
"EnableAggregatedMlSearchRanking", base::FEATURE_DISABLED_BY_DEFAULT}; "EnableAggregatedMlSearchRanking", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kNewDragSpecInLauncher{"NewDragSpecInLauncher",
base::FEATURE_DISABLED_BY_DEFAULT};
bool IsAnswerCardEnabled() { bool IsAnswerCardEnabled() {
// Not using local static variable to allow tests to change this value. // Not using local static variable to allow tests to change this value.
...@@ -149,6 +151,10 @@ bool IsAggregatedMlSearchRankingEnabled() { ...@@ -149,6 +151,10 @@ bool IsAggregatedMlSearchRankingEnabled() {
return base::FeatureList::IsEnabled(kEnableAggregatedMlSearchRanking); return base::FeatureList::IsEnabled(kEnableAggregatedMlSearchRanking);
} }
bool IsNewDragSpecInLauncherEnabled() {
return base::FeatureList::IsEnabled(kNewDragSpecInLauncher);
}
std::string AnswerServerUrl() { std::string AnswerServerUrl() {
const std::string experiment_url = const std::string experiment_url =
base::GetFieldTrialParamValueByFeature(kEnableAnswerCard, "ServerUrl"); base::GetFieldTrialParamValueByFeature(kEnableAnswerCard, "ServerUrl");
......
...@@ -90,6 +90,11 @@ ASH_PUBLIC_EXPORT extern const base::Feature kScalableAppList; ...@@ -90,6 +90,11 @@ ASH_PUBLIC_EXPORT extern const base::Feature kScalableAppList;
// non empty queries. // non empty queries.
ASH_PUBLIC_EXPORT extern const base::Feature kEnableAggregatedMlSearchRanking; ASH_PUBLIC_EXPORT extern const base::Feature kEnableAggregatedMlSearchRanking;
// Enables the new app dragging in the launcher. When the users drags an app
// within the launcher, this flag will enable the new cardified state, where
// apps grid pages are scaled down and shown a background card.
ASH_PUBLIC_EXPORT extern const base::Feature kNewDragSpecInLauncher;
bool ASH_PUBLIC_EXPORT IsAnswerCardEnabled(); bool ASH_PUBLIC_EXPORT IsAnswerCardEnabled();
bool ASH_PUBLIC_EXPORT IsPlayStoreAppSearchEnabled(); bool ASH_PUBLIC_EXPORT IsPlayStoreAppSearchEnabled();
bool ASH_PUBLIC_EXPORT IsAppDataSearchEnabled(); bool ASH_PUBLIC_EXPORT IsAppDataSearchEnabled();
...@@ -112,6 +117,7 @@ bool ASH_PUBLIC_EXPORT IsFuzzyAppSearchEnabled(); ...@@ -112,6 +117,7 @@ bool ASH_PUBLIC_EXPORT IsFuzzyAppSearchEnabled();
bool ASH_PUBLIC_EXPORT IsExactMatchForNonLatinLocaleEnabled(); bool ASH_PUBLIC_EXPORT IsExactMatchForNonLatinLocaleEnabled();
bool ASH_PUBLIC_EXPORT IsLauncherSettingsSearchEnabled(); bool ASH_PUBLIC_EXPORT IsLauncherSettingsSearchEnabled();
bool ASH_PUBLIC_EXPORT IsAggregatedMlSearchRankingEnabled(); bool ASH_PUBLIC_EXPORT IsAggregatedMlSearchRankingEnabled();
bool ASH_PUBLIC_EXPORT IsNewDragSpecInLauncherEnabled();
std::string ASH_PUBLIC_EXPORT AnswerServerUrl(); std::string ASH_PUBLIC_EXPORT AnswerServerUrl();
std::string ASH_PUBLIC_EXPORT AnswerServerQuerySuffix(); std::string ASH_PUBLIC_EXPORT AnswerServerQuerySuffix();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment