Charlene Yan | 0724dc56 | 2019-04-12 17:57:41 | [diff] [blame] | 1 | // Copyright 2019 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 | // This file defines the browser-specific base::FeatureList features that are |
| 6 | // limited to top chrome UI. |
| 7 | |
| 8 | #ifndef CHROME_BROWSER_UI_UI_FEATURES_H_ |
| 9 | #define CHROME_BROWSER_UI_UI_FEATURES_H_ |
| 10 | |
| 11 | #include "base/feature_list.h" |
Thomas Lukaszewicz | 31c038da | 2020-09-24 22:49:07 | [diff] [blame] | 12 | #include "base/metrics/field_trial_params.h" |
Dana Fried | 16e9d9c | 2021-01-28 09:32:28 | [diff] [blame^] | 13 | #include "build/branding_buildflags.h" |
Charlene Yan | 0724dc56 | 2019-04-12 17:57:41 | [diff] [blame] | 14 | #include "build/build_config.h" |
Yuta Hijikata | 40b891d | 2020-11-27 09:05:01 | [diff] [blame] | 15 | #include "build/chromeos_buildflags.h" |
Peter Boström | 92add81d | 2019-08-12 22:14:24 | [diff] [blame] | 16 | #include "chrome/common/buildflags.h" |
Devlin Cronin | 5739bf0 | 2020-05-15 00:38:38 | [diff] [blame] | 17 | #include "extensions/buildflags/buildflags.h" |
Charlene Yan | 0724dc56 | 2019-04-12 17:57:41 | [diff] [blame] | 18 | |
| 19 | namespace features { |
| 20 | |
| 21 | // All features in alphabetical order. The features should be documented |
| 22 | // alongside the definition of their values in the .cc file. |
| 23 | |
Elaine Chien | 29fce99 | 2020-12-01 17:44:34 | [diff] [blame] | 24 | extern const base::Feature kChromeLabs; |
| 25 | |
Dana Fried | 16e9d9c | 2021-01-28 09:32:28 | [diff] [blame^] | 26 | #if BUILDFLAG(GOOGLE_CHROME_BRANDING) |
| 27 | extern const base::Feature kChromeTipsInMainMenu; |
| 28 | #endif |
| 29 | |
Christopher Thompson | f3ba2012 | 2019-06-06 22:01:01 | [diff] [blame] | 30 | extern const base::Feature kEvDetailsInPageInfo; |
| 31 | |
Devlin Cronin | 5739bf0 | 2020-05-15 00:38:38 | [diff] [blame] | 32 | #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 33 | extern const base::Feature kExtensionSettingsOverriddenDialogs; |
| 34 | #endif |
| 35 | |
Charlene Yan | 0724dc56 | 2019-04-12 17:57:41 | [diff] [blame] | 36 | extern const base::Feature kExtensionsToolbarMenu; |
| 37 | |
rbpotter | 8c735ba | 2020-11-12 14:11:55 | [diff] [blame] | 38 | extern const base::Feature kForceEnablePrivetPrinting; |
| 39 | |
Monica Basta | e233141 | 2020-04-10 14:07:30 | [diff] [blame] | 40 | extern const base::Feature kNewProfilePicker; |
| 41 | |
Taylor Bergquist | 187a9f9 | 2019-08-12 22:13:15 | [diff] [blame] | 42 | extern const base::Feature kNewTabstripAnimation; |
| 43 | |
Joel Hockey | 73bc712 | 2019-10-20 21:41:11 | [diff] [blame] | 44 | extern const base::Feature kProminentDarkModeActiveTabTitle; |
| 45 | |
Charlene Yan | 0ccd7f5 | 2019-04-12 23:20:59 | [diff] [blame] | 46 | extern const base::Feature kScrollableTabStrip; |
| 47 | |
Charlene Yan | a816410 | 2020-11-10 04:39:48 | [diff] [blame] | 48 | extern const base::Feature kScrollableTabStripButtons; |
| 49 | |
Peter Boström | 259e147 | 2020-10-22 22:26:24 | [diff] [blame] | 50 | extern const base::Feature kSidePanel; |
| 51 | |
Yann Dago | 0706f607 | 2020-12-02 04:35:38 | [diff] [blame] | 52 | extern const base::Feature kSyncConfirmationUpdatedText; |
| 53 | |
Jan Krcal | 6c22f9f | 2021-01-07 10:34:41 | [diff] [blame] | 54 | extern const base::Feature kSignInProfileCreation; |
dizg | ad7fe84 | 2020-08-12 16:55:16 | [diff] [blame] | 55 | |
Charlene Yan | 45ff10d9 | 2020-09-16 03:14:59 | [diff] [blame] | 56 | extern const base::Feature kTabGroupsAutoCreate; |
| 57 | |
Charlene Yan | d4923529 | 2020-03-14 00:55:43 | [diff] [blame] | 58 | extern const base::Feature kTabGroupsCollapse; |
| 59 | |
Charlene Yan | 65e7cfe | 2020-07-28 18:55:29 | [diff] [blame] | 60 | extern const base::Feature kTabGroupsCollapseFreezing; |
| 61 | |
Charlene Yan | 5b80e05 | 2020-04-02 20:48:56 | [diff] [blame] | 62 | extern const base::Feature kTabGroupsFeedback; |
| 63 | |
Charlene Yan | 0724dc56 | 2019-04-12 17:57:41 | [diff] [blame] | 64 | extern const base::Feature kTabHoverCards; |
| 65 | extern const char kTabHoverCardsFeatureParameterName[]; |
| 66 | |
| 67 | extern const base::Feature kTabHoverCardImages; |
| 68 | |
Dana Fried | 07b03c6 | 2019-07-31 19:20:56 | [diff] [blame] | 69 | extern const base::Feature kTabOutlinesInLowContrastThemes; |
| 70 | |
Yuheng Huang | 4a8125c | 2020-06-23 20:45:36 | [diff] [blame] | 71 | extern const base::Feature kTabSearch; |
| 72 | |
Roman Arora | 4d4bb4b | 2020-09-24 17:28:13 | [diff] [blame] | 73 | extern const base::Feature kTabSearchFeedback; |
| 74 | |
Thomas Lukaszewicz | 31c038da | 2020-09-24 22:49:07 | [diff] [blame] | 75 | // Setting this to true will ignore the distance parameter when finding matches. |
| 76 | // This means that it will not matter where in the string the pattern occurs. |
| 77 | extern const base::FeatureParam<bool> kTabSearchSearchIgnoreLocation; |
| 78 | |
| 79 | // Determines how close the match must be to the beginning of the string. Eg a |
| 80 | // distance of 100 and threshold of 0.8 would require a perfect match to be |
| 81 | // within 80 characters of the beginning of the string. |
| 82 | extern const base::FeatureParam<int> kTabSearchSearchDistance; |
| 83 | |
| 84 | // This determines how strong the match should be for the item to be included in |
| 85 | // the result set. Eg a threshold of 0.0 requires a perfect match, 1.0 would |
| 86 | // match anything. Permissible values are [0.0, 1.0]. |
| 87 | extern const base::FeatureParam<double> kTabSearchSearchThreshold; |
| 88 | |
| 89 | // These are the hardcoded minimum and maximum search threshold values for |
| 90 | // |kTabSearchSearchThreshold|. |
| 91 | constexpr double kTabSearchSearchThresholdMin = 0.0; |
| 92 | constexpr double kTabSearchSearchThresholdMax = 1.0; |
| 93 | |
| 94 | // Controls how heavily weighted the tab's title is relative to the hostname. |
| 95 | extern const base::FeatureParam<double> kTabSearchTitleToHostnameWeightRatio; |
| 96 | |
Yuheng Huang | b2aa1bd4 | 2020-11-11 20:07:09 | [diff] [blame] | 97 | // Whether to move the active tab to the bottom of the list. |
| 98 | extern const base::FeatureParam<bool> kTabSearchMoveActiveTabToBottom; |
| 99 | |
Peter Boström | 6e72119 | 2019-08-15 18:49:02 | [diff] [blame] | 100 | extern const base::Feature kWebFooterExperiment; |
| 101 | |
Collin Baker | 33a13f5 | 2019-12-13 00:30:23 | [diff] [blame] | 102 | extern const base::Feature kWebUITabStrip; |
| 103 | |
Yuta Hijikata | 40b891d | 2020-11-27 09:05:01 | [diff] [blame] | 104 | #if BUILDFLAG(IS_CHROMEOS_ASH) |
Melissa Galonsky | a0c17c9 | 2019-06-27 18:34:19 | [diff] [blame] | 105 | extern const base::Feature kHiddenNetworkWarning; |
Harry Cutts | 5b430df | 2020-09-22 11:22:29 | [diff] [blame] | 106 | extern const base::Feature kSeparatePointingStickSettings; |
Yuta Hijikata | 40b891d | 2020-11-27 09:05:01 | [diff] [blame] | 107 | #endif // BUILDFLAG(IS_CHROMEOS_ASH) |
Dana Fried | 16e9d9c | 2021-01-28 09:32:28 | [diff] [blame^] | 108 | |
Charlene Yan | 0724dc56 | 2019-04-12 17:57:41 | [diff] [blame] | 109 | } // namespace features |
| 110 | |
| 111 | #endif // CHROME_BROWSER_UI_UI_FEATURES_H_ |