Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [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 | #include "components/omnibox/common/omnibox_features.h" |
| 6 | |
manuk | c32a8eff | 2019-07-02 15:48:30 | [diff] [blame] | 7 | #include "build/build_config.h" |
| 8 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 9 | namespace omnibox { |
| 10 | |
Tomasz Wiszkowski | 8a0e0dc4 | 2020-02-19 00:06:37 | [diff] [blame] | 11 | // Allows Omnibox to dynamically adjust number of offered suggestions to fill in |
| 12 | // the space between Omnibox an the soft keyboard. The number of suggestions |
| 13 | // shown will be no less than minimum for the platform (eg. 5 for Android). |
| 14 | const base::Feature kAdaptiveSuggestionsCount{ |
| 15 | "OmniboxAdaptiveSuggestionsCount", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 16 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 17 | // Feature used to hide the scheme from steady state URLs displayed in the |
| 18 | // toolbar. It is restored during editing. |
| 19 | const base::Feature kHideFileUrlScheme { |
| 20 | "OmniboxUIExperimentHideFileUrlScheme", |
| 21 | // Android and iOS don't have the File security chip, and therefore still |
| 22 | // need to show the file scheme. |
| 23 | #if defined(OS_ANDROID) || defined(OS_IOS) |
| 24 | base::FEATURE_DISABLED_BY_DEFAULT |
| 25 | #else |
| 26 | base::FEATURE_ENABLED_BY_DEFAULT |
| 27 | #endif |
| 28 | }; |
| 29 | |
| 30 | // Feature used to hide the scheme from steady state URLs displayed in the |
| 31 | // toolbar. It is restored during editing. |
Tommy C. Li | 7514ba8 | 2019-06-25 19:43:53 | [diff] [blame] | 32 | const base::Feature kHideSteadyStateUrlScheme{ |
| 33 | "OmniboxUIExperimentHideSteadyStateUrlScheme", |
| 34 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 35 | |
| 36 | // Feature used to hide trivial subdomains from steady state URLs displayed in |
| 37 | // the toolbar. It is restored during editing. |
Tommy C. Li | 7514ba8 | 2019-06-25 19:43:53 | [diff] [blame] | 38 | const base::Feature kHideSteadyStateUrlTrivialSubdomains{ |
| 39 | "OmniboxUIExperimentHideSteadyStateUrlTrivialSubdomains", |
| 40 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 41 | |
| 42 | // Feature used to hide the path, query and ref from steady state URLs |
| 43 | // displayed in the toolbar. It is restored during editing. |
| 44 | const base::Feature kHideSteadyStateUrlPathQueryAndRef { |
| 45 | "OmniboxUIExperimentHideSteadyStateUrlPathQueryAndRef", |
| 46 | #if defined(OS_IOS) |
| 47 | base::FEATURE_ENABLED_BY_DEFAULT |
| 48 | #else |
| 49 | base::FEATURE_DISABLED_BY_DEFAULT |
| 50 | #endif |
| 51 | }; |
| 52 | |
manuk | addd3c4 | 2019-04-09 21:20:59 | [diff] [blame] | 53 | // Feature used to enable local entity suggestions. Similar to rich entities but |
| 54 | // but location specific. E.g., typing 'starbucks near' could display the local |
| 55 | // entity suggestion 'starbucks near disneyland \n starbucks * Anaheim, CA'. |
| 56 | const base::Feature kOmniboxLocalEntitySuggestions{ |
| 57 | "OmniboxLocalEntitySuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 58 | |
Kevin Bailey | b3e0873 | 2019-05-29 03:55:25 | [diff] [blame] | 59 | // Feature used to cap the number of URL-type matches shown within the |
| 60 | // Omnibox. If enabled, the number of URL-type matches is limited (unless |
| 61 | // there are no more non-URL matches available.) If enabled, there is a |
| 62 | // companion parameter - OmniboxMaxURLMatches - which specifies the maximum |
| 63 | // desired number of URL-type matches. |
Kevin Bailey | 2623886 | 2019-10-31 22:08:12 | [diff] [blame] | 64 | const base::Feature kOmniboxMaxURLMatches { |
| 65 | "OmniboxMaxURLMatches", |
| 66 | #if defined(OS_IOS) || defined(OS_ANDROID) |
| 67 | base::FEATURE_DISABLED_BY_DEFAULT |
| 68 | #else |
| 69 | base::FEATURE_ENABLED_BY_DEFAULT |
| 70 | #endif |
| 71 | }; |
Kevin Bailey | b3e0873 | 2019-05-29 03:55:25 | [diff] [blame] | 72 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 73 | // Feature used to enable swapping the rows on answers. |
| 74 | const base::Feature kOmniboxReverseAnswers{"OmniboxReverseAnswers", |
| 75 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 76 | |
Kevin Bailey | 7d918b9 | 2019-05-02 16:00:14 | [diff] [blame] | 77 | // Feature used to enable matching short words to bookmarks for suggestions. |
| 78 | const base::Feature kOmniboxShortBookmarkSuggestions{ |
| 79 | "OmniboxShortBookmarkSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 80 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 81 | // Feature used to force on the experiment of transmission of tail suggestions |
| 82 | // from GWS to this client, currently testing for desktop. |
| 83 | const base::Feature kOmniboxTailSuggestions{ |
| 84 | "OmniboxTailSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 85 | |
Kevin Bailey | 37bbf1d | 2019-08-21 19:23:55 | [diff] [blame] | 86 | // Feature that enables the tab-switch suggestions corresponding to an open |
| 87 | // tab, for a button or dedicated suggestion. Enabled by default on Desktop |
| 88 | // and iOS. |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 89 | const base::Feature kOmniboxTabSwitchSuggestions{ |
| 90 | "OmniboxTabSwitchSuggestions", |
Stepan Khapugin | b0980166 | 2019-05-07 10:17:04 | [diff] [blame] | 91 | #if defined(OS_ANDROID) |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 92 | base::FEATURE_DISABLED_BY_DEFAULT |
| 93 | #else |
| 94 | base::FEATURE_ENABLED_BY_DEFAULT |
| 95 | #endif |
| 96 | }; |
| 97 | |
Kevin Bailey | 37bbf1d | 2019-08-21 19:23:55 | [diff] [blame] | 98 | // Feature that enables tab-switch suggestions in their own row. |
| 99 | const base::Feature kOmniboxTabSwitchSuggestionsDedicatedRow{ |
| 100 | "OmniboxTabSwitchSuggestionsDedicatedRow", |
| 101 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 102 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 103 | // Feature used to enable various experiments on keyword mode, UI and |
| 104 | // suggestions. |
| 105 | const base::Feature kExperimentalKeywordMode{"OmniboxExperimentalKeywordMode", |
| 106 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 107 | |
| 108 | // Feature used to enable Pedal suggestions. |
| 109 | const base::Feature kOmniboxPedalSuggestions{"OmniboxPedalSuggestions", |
| 110 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 111 | |
Tommy C. Li | b3b192f | 2020-03-27 22:50:26 | [diff] [blame] | 112 | // Feature that surfaces an X button next to deletable omnibox suggestions. |
| 113 | // This is to make the suggestion removal feature more discoverable. |
Tommy C. Li | a2c75fb | 2019-04-08 20:22:34 | [diff] [blame] | 114 | const base::Feature kOmniboxSuggestionTransparencyOptions{ |
Tommy C. Li | b3b192f | 2020-03-27 22:50:26 | [diff] [blame] | 115 | "OmniboxSuggestionTransparencyOptions", base::FEATURE_ENABLED_BY_DEFAULT}; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 116 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 117 | // Feature to enable clipboard provider to suggest searching for copied images. |
| 118 | const base::Feature kEnableClipboardProviderImageSuggestions{ |
Robbie Gibson | 85cef318 | 2019-07-21 15:10:29 | [diff] [blame] | 119 | "OmniboxEnableClipboardProviderImageSuggestions", |
| 120 | #if defined(OS_IOS) |
| 121 | base::FEATURE_ENABLED_BY_DEFAULT |
| 122 | #else |
| 123 | base::FEATURE_DISABLED_BY_DEFAULT |
| 124 | #endif |
| 125 | }; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 126 | |
| 127 | // Feature to enable the search provider to send a request to the suggest |
| 128 | // server on focus. This allows the suggest server to warm up, by, for |
| 129 | // example, loading per-user models into memory. Having a per-user model |
| 130 | // in memory allows the suggest server to respond more quickly with |
| 131 | // personalized suggestions as the user types. |
| 132 | const base::Feature kSearchProviderWarmUpOnFocus{ |
| 133 | "OmniboxWarmUpSearchProviderOnFocus", |
| 134 | #if defined(OS_IOS) |
| 135 | base::FEATURE_DISABLED_BY_DEFAULT |
| 136 | #else |
| 137 | base::FEATURE_ENABLED_BY_DEFAULT |
| 138 | #endif |
| 139 | }; |
| 140 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 141 | // Feature used to display the title of the current URL match. |
| 142 | const base::Feature kDisplayTitleForCurrentUrl{ |
| 143 | "OmniboxDisplayTitleForCurrentUrl", |
| 144 | #if !defined(OS_IOS) |
| 145 | base::FEATURE_ENABLED_BY_DEFAULT |
| 146 | #else |
| 147 | base::FEATURE_DISABLED_BY_DEFAULT |
| 148 | #endif |
| 149 | }; |
| 150 | |
| 151 | // Feature used for the max autocomplete matches UI experiment. |
| 152 | const base::Feature kUIExperimentMaxAutocompleteMatches{ |
| 153 | "OmniboxUIExperimentMaxAutocompleteMatches", |
| 154 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 155 | |
| 156 | // Feature used to display the search terms instead of the URL in the Omnibox |
| 157 | // when the user is on the search results page of the default search provider. |
| 158 | const base::Feature kQueryInOmnibox{"QueryInOmnibox", |
| 159 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 160 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 161 | // Feature used to always swap the title and URL. |
| 162 | const base::Feature kUIExperimentSwapTitleAndUrl{ |
| 163 | "OmniboxUIExperimentSwapTitleAndUrl", |
| 164 | #if defined(OS_IOS) || defined(OS_ANDROID) |
| 165 | base::FEATURE_DISABLED_BY_DEFAULT |
| 166 | #else |
| 167 | base::FEATURE_ENABLED_BY_DEFAULT |
| 168 | #endif |
| 169 | }; |
| 170 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 171 | // Feature used to enable speculatively starting a service worker associated |
| 172 | // with the destination of the default match when the user's input looks like a |
| 173 | // query. |
| 174 | const base::Feature kSpeculativeServiceWorkerStartOnQueryInput{ |
| 175 | "OmniboxSpeculativeServiceWorkerStartOnQueryInput", |
| 176 | base::FEATURE_ENABLED_BY_DEFAULT |
| 177 | }; |
| 178 | |
| 179 | // Feature used to fetch document suggestions. |
| 180 | const base::Feature kDocumentProvider{"OmniboxDocumentProvider", |
| 181 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 182 | |
manuk | 4542e23 | 2019-09-11 19:27:35 | [diff] [blame] | 183 | // Feature used to autocomplete bookmark, history, and document suggestions when |
| 184 | // the user input is a prefix of their titles, as opposed to their URLs. |
| 185 | const base::Feature kAutocompleteTitles{"OmniboxAutocompleteTitles", |
| 186 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 187 | |
Patrick Noland | 2b4968b | 2019-06-27 14:50:26 | [diff] [blame] | 188 | // Returns whether IsInstantExtendedAPIEnabled should be ignored when deciding |
| 189 | // the number of Google-provided search suggestions. |
| 190 | const base::Feature kOmniboxDisableInstantExtendedLimit{ |
Ender | 74affe26 | 2020-05-01 23:52:49 | [diff] [blame^] | 191 | "OmniboxDisableInstantExtendedLimit", base::FEATURE_DISABLED_BY_DEFAULT}; |
Patrick Noland | 2b4968b | 2019-06-27 14:50:26 | [diff] [blame] | 192 | |
Brandon Wylie | f8dd4e8 | 2019-07-11 16:39:57 | [diff] [blame] | 193 | // Show the search engine logo in the omnibox on Android (desktop already does |
| 194 | // this). |
| 195 | const base::Feature kOmniboxSearchEngineLogo{"OmniboxSearchEngineLogo", |
| 196 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 197 | |
manuk | bf3c8ab | 2019-10-24 16:52:08 | [diff] [blame] | 198 | // Feature used to allow users to remove suggestions from clipboard. |
| 199 | const base::Feature kOmniboxRemoveSuggestionsFromClipboard{ |
| 200 | "OmniboxRemoveSuggestionsFromClipboard", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 201 | |
manuk | bf3c8ab | 2019-10-24 16:52:08 | [diff] [blame] | 202 | // Feature to debounce drive requests from the document provider. |
| 203 | const base::Feature kDebounceDocumentProvider{ |
| 204 | "OmniboxDebounceDocumentProvider", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 205 | |
Tommy Li | 6390ecc | 2019-09-06 21:08:57 | [diff] [blame] | 206 | // Preserves the default match against change when providers return results |
| 207 | // asynchronously. This prevents the default match from changing after the user |
| 208 | // finishes typing. Without this feature, if the default match is updated right |
| 209 | // when the user presses Enter, the user may go to a surprising destination. |
| 210 | const base::Feature kOmniboxPreserveDefaultMatchAgainstAsyncUpdate{ |
| 211 | "OmniboxPreserveDefaultMatchAgainstAsyncUpdate", |
Tommy Li | 2b9db03 | 2020-03-02 22:12:14 | [diff] [blame] | 212 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Tommy Li | 6390ecc | 2019-09-06 21:08:57 | [diff] [blame] | 213 | |
manuk | 7b89f664 | 2019-11-08 19:25:24 | [diff] [blame] | 214 | // Demotes the relevance scores when comparing suggestions based on the |
| 215 | // suggestion's |AutocompleteMatchType| and the user's |PageClassification|. |
| 216 | // This feature's main job is to contain the DemoteByType parameter. |
| 217 | const base::Feature kOmniboxDemoteByType{"OmniboxDemoteByType", |
| 218 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 219 | |
Justin Donnelly | 477e35e | 2020-04-02 14:40:00 | [diff] [blame] | 220 | // A special flag, enabled by default, that can be used to disable all new |
| 221 | // search features (e.g. zero suggest). |
| 222 | const base::Feature kNewSearchFeatures{"OmniboxNewSearchFeatures", |
| 223 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 224 | |
Tommy Li | b4b3bb5b | 2020-05-01 02:34:56 | [diff] [blame] | 225 | // Feature that configures ZeroSuggestProvider using the "ZeroSuggestVariant" |
| 226 | // per-page-classification parameter. |
Tommy Li | 5578402 | 2020-04-28 20:58:18 | [diff] [blame] | 227 | // |
Tommy Li | b4b3bb5b | 2020-05-01 02:34:56 | [diff] [blame] | 228 | // Generally speaking - do NOT use this for future server-side experiments. |
| 229 | // Instead, create your a new narrowly scoped base::Feature for each experiment. |
| 230 | // |
| 231 | // Because our Field Trial system can only configure this base::Feature in a |
| 232 | // single study, and does not merge parameters, using this creates conflicts. |
Tommy C. Li | 09010551 | 2019-05-16 22:00:56 | [diff] [blame] | 233 | const base::Feature kOnFocusSuggestions{"OmniboxOnFocusSuggestions", |
| 234 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 235 | |
Tommy Li | 5578402 | 2020-04-28 20:58:18 | [diff] [blame] | 236 | // Enables on-focus suggestions on the Open Web, that are contextual to the |
| 237 | // current URL. Will only work if user is signed-in and syncing, or is |
| 238 | // otherwise eligible to send the current page URL to the suggest server. |
| 239 | const base::Feature kOnFocusSuggestionsContextualWeb{ |
| 240 | "OmniboxOnFocusSuggestionsContextualWeb", |
| 241 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 242 | |
Tommy Li | b4b3bb5b | 2020-05-01 02:34:56 | [diff] [blame] | 243 | // Enables Proactive ZeroSuggestions (PZPS) on the NTP, for the Omnibox and |
| 244 | // Realbox respectively. Note: enabling this feature merely makes |
| 245 | // ZeroSuggestProvider send the request. There are additional requirements, |
| 246 | // like the user being signed-in, and the suggest server having PZPS enabled. |
| 247 | const base::Feature kProactiveZeroSuggestionsOnNTPOmnibox{ |
| 248 | "OmniboxProactiveZeroSuggestionsOnNTPOmnibox", |
| 249 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 250 | const base::Feature kProactiveZeroSuggestionsOnNTPRealbox{ |
| 251 | "OmniboxProactiveZeroSuggestionsOnNTPRealbox", |
| 252 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 253 | |
Tomasz Wiszkowski | 947f6d0d | 2019-03-15 22:27:25 | [diff] [blame] | 254 | // Allow suggestions to be shown to the user on the New Tab Page upon focusing |
| 255 | // URL bar (the omnibox). |
| 256 | const base::Feature kZeroSuggestionsOnNTP{"OmniboxZeroSuggestionsOnNTP", |
| 257 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 258 | |
Moe Ahmadi | 4005ec9 | 2019-09-09 16:55:53 | [diff] [blame] | 259 | // Allow suggestions to be shown to the user on the New Tab Page upon focusing |
| 260 | // the real search box. |
| 261 | const base::Feature kZeroSuggestionsOnNTPRealbox{ |
| 262 | "OmniboxZeroSuggestionsOnNTPRealbox", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 263 | |
Tommy Li | 1d03b9bf | 2019-09-23 23:46:34 | [diff] [blame] | 264 | // Allow on-focus query refinements to be shown on the default SERP. |
| 265 | const base::Feature kZeroSuggestionsOnSERP{"OmniboxZeroSuggestionsOnSERP", |
| 266 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 267 | |
Ce Chen | c8d803a | 2020-04-27 09:31:33 | [diff] [blame] | 268 | // Features to provide non personalized head search suggestion from a compact |
| 269 | // on device model. More specifically, feature name with suffix Incognito / |
| 270 | // NonIncognito will only controls behaviors under incognito / non-incognito |
| 271 | // mode respectively. |
| 272 | const base::Feature kOnDeviceHeadProviderIncognito{ |
| 273 | "OmniboxOnDeviceHeadProviderIncognito", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 274 | const base::Feature kOnDeviceHeadProviderNonIncognito{ |
| 275 | "OmniboxOnDeviceHeadProviderNonIncognito", |
| 276 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 277 | |
Justin Donnelly | f270348 | 2019-10-24 21:42:15 | [diff] [blame] | 278 | // If enabled, changes the way Google-provided search suggestions are scored by |
| 279 | // the backend. Note that this Feature is only used for triggering a server- |
| 280 | // side experiment config that will send experiment IDs to the backend. It is |
| 281 | // not referred to in any of the Chromium code. |
| 282 | const base::Feature kOmniboxExperimentalSuggestScoring{ |
| 283 | "OmniboxExperimentalSuggestScoring", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 284 | |
manukh | 3bb80c9 | 2020-01-22 00:19:46 | [diff] [blame] | 285 | // If disabled, terms with no wordstart matches disqualify the suggestion unless |
| 286 | // they occur in the URL host. If enabled, terms with no wordstart matches are |
| 287 | // allowed but not scored. E.g., both inputs 'java script' and 'java cript' will |
| 288 | // match a suggestion titled 'javascript' and score equivalently. |
manukh | 5ff0f58 | 2020-01-14 03:54:13 | [diff] [blame] | 289 | const base::Feature kHistoryQuickProviderAllowButDoNotScoreMidwordTerms{ |
| 290 | "OmniboxHistoryQuickProviderAllowButDoNotScoreMidwordTerms", |
| 291 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 292 | |
manukh | 3bb80c9 | 2020-01-22 00:19:46 | [diff] [blame] | 293 | // If disabled, midword matches are ignored except in the URL host, and input |
| 294 | // terms with no wordstart matches are scored 0, resulting in an overall score |
| 295 | // of 0. If enabled, midword matches are allowed and scored when they begin |
| 296 | // immediately after the previous match ends. E.g. 'java script' will match a |
| 297 | // suggestion titled 'javascript' but the input 'java cript' won't. |
manukh | 5ff0f58 | 2020-01-14 03:54:13 | [diff] [blame] | 298 | const base::Feature kHistoryQuickProviderAllowMidwordContinuations{ |
| 299 | "OmniboxHistoryQuickProviderAllowMidwordContinuations", |
| 300 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 301 | |
Tomasz Wiszkowski | 70fb35f | 2020-02-27 00:39:19 | [diff] [blame] | 302 | // If enabled, shows slightly more compact suggestions, allowing the |
| 303 | // kAdaptiveSuggestionsCount feature to fit more suggestions on screen. |
| 304 | const base::Feature kCompactSuggestions{"OmniboxCompactSuggestions", |
| 305 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 306 | |
Tommy Li | 7c2bf49 | 2019-10-22 19:34:23 | [diff] [blame] | 307 | // If enabled, shows a confirm dialog before removing search suggestions from |
| 308 | // the omnibox. See ConfirmNtpSuggestionRemovals for the NTP equivalent. |
| 309 | const base::Feature kConfirmOmniboxSuggestionRemovals{ |
| 310 | "ConfirmOmniboxSuggestionRemovals", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 311 | |
Tomasz Wiszkowski | 70fb35f | 2020-02-27 00:39:19 | [diff] [blame] | 312 | // If enabled, defers keyboard popup when user highlights the omnibox until |
| 313 | // the user taps the Omnibox again. |
| 314 | extern const base::Feature kDeferredKeyboardPopup{ |
| 315 | "OmniboxDeferredKeyboardPopup", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 316 | |
manuk | 695f9d453 | 2020-03-18 19:22:08 | [diff] [blame] | 317 | // If enabled, expands autocompletion to possibly (depending on params) include |
| 318 | // suggestion titles and non-prefixes as opposed to be restricted to URL |
| 319 | // prefixes. Will also adjust the location bar UI and omnibox text selection to |
| 320 | // accommodate the autocompletions. |
| 321 | const base::Feature kRichAutocompletion{"OmniboxRichAutocompletion", |
| 322 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 323 | |
Kevin Bailey | 104e4449 | 2019-10-31 16:42:32 | [diff] [blame] | 324 | // Feature that enables not counting submatches towards the maximum |
| 325 | // suggestion limit. |
| 326 | const base::Feature kOmniboxLooseMaxLimitOnDedicatedRows{ |
| 327 | "OmniboxLooseMaxLimitOnDedicatedRows", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 328 | |
Orin Jaworski | fc17472 | 2020-01-29 00:32:22 | [diff] [blame] | 329 | // Feature that puts a single row of buttons on suggestions with actionable |
| 330 | // elements like keywords, tab-switch buttons, and Pedals. |
| 331 | const base::Feature kOmniboxSuggestionButtonRow{ |
| 332 | "OmniboxSuggestionButtonRow", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 333 | |
Filip Gorski | 927709ea | 2020-04-30 15:58:37 | [diff] [blame] | 334 | // Enables using an Android RecyclerView to render the suggestions dropdown |
| 335 | // instead of a ListView. |
| 336 | const base::Feature kOmniboxSuggestionsRecyclerView{ |
| 337 | "OmniboxSuggestionsRecyclerView", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 338 | |
Tommy Li | 1f1fc4a | 2020-01-31 21:02:07 | [diff] [blame] | 339 | // If enabled, uses WebUI to render the omnibox suggestions popup, similar to |
| 340 | // how the NTP "fakebox" is implemented. |
| 341 | const base::Feature kWebUIOmniboxPopup{"WebUIOmniboxPopup", |
| 342 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 343 | |
Brandon Wylie | 1299ff8 | 2020-01-23 02:13:37 | [diff] [blame] | 344 | // When enabled, use Assistant for omnibox voice query recognition instead of |
| 345 | // Android's built-in voice recognition service. Only works on Android. |
| 346 | const base::Feature kOmniboxAssistantVoiceSearch{ |
| 347 | "OmniboxAssistantVoiceSearch", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 348 | |
Livvie Lin | 30a9f9d | 2020-03-17 19:45:19 | [diff] [blame] | 349 | // When enabled, provides an omnibox context menu option that prevents URL |
| 350 | // elisions. |
| 351 | const base::Feature kOmniboxContextMenuShowFullUrls{ |
| 352 | "OmniboxContextMenuShowFullUrls", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 353 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 354 | } // namespace omnibox |