blob: 22dbd2ef610b2c6f063ccb87af1e99249d681452 [file] [log] [blame]
Tomasz Wiszkowskid938a1112019-03-06 18:01:571// 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
manukc32a8eff2019-07-02 15:48:307#include "build/build_config.h"
8
Tomasz Wiszkowskid938a1112019-03-06 18:01:579namespace omnibox {
10
manuk06717f92020-05-29 15:38:4711const auto enabled_by_default_desktop_only =
12#if defined(OS_ANDROID) || defined(OS_IOS)
Filip Gorski87f1594002020-08-18 21:07:5513 base::FEATURE_DISABLED_BY_DEFAULT;
manuk06717f92020-05-29 15:38:4714#else
Filip Gorski87f1594002020-08-18 21:07:5515 base::FEATURE_ENABLED_BY_DEFAULT;
manuk06717f92020-05-29 15:38:4716#endif
Filip Gorski87f1594002020-08-18 21:07:5517
18const auto enabled_by_default_android_only =
19#if defined(OS_ANDROID)
20 base::FEATURE_ENABLED_BY_DEFAULT;
21#else
22 base::FEATURE_DISABLED_BY_DEFAULT;
23#endif
24
25const auto enabled_by_default_ios_only =
26#if defined(OS_IOS)
27 base::FEATURE_ENABLED_BY_DEFAULT;
28#else
29 base::FEATURE_DISABLED_BY_DEFAULT;
30#endif
31
32const auto enabled_by_default_desktop_android =
33#if defined(OS_IOS)
34 base::FEATURE_DISABLED_BY_DEFAULT;
35#else
36 base::FEATURE_ENABLED_BY_DEFAULT;
37#endif
38
39const auto enabled_by_default_desktop_ios =
40#if defined(OS_ANDROID)
41 base::FEATURE_DISABLED_BY_DEFAULT;
42#else
43 base::FEATURE_ENABLED_BY_DEFAULT;
44#endif
manuk06717f92020-05-29 15:38:4745
Justin Donnellyca2d5b22020-09-03 19:37:5046const auto enabled_by_default_android_ios =
47#if defined(OS_ANDROID) || defined(OS_IOS)
48 base::FEATURE_ENABLED_BY_DEFAULT;
49#else
50 base::FEATURE_DISABLED_BY_DEFAULT;
51#endif
52
Tomasz Wiszkowski8a0e0dc42020-02-19 00:06:3753// Allows Omnibox to dynamically adjust number of offered suggestions to fill in
54// the space between Omnibox an the soft keyboard. The number of suggestions
55// shown will be no less than minimum for the platform (eg. 5 for Android).
56const base::Feature kAdaptiveSuggestionsCount{
57 "OmniboxAdaptiveSuggestionsCount", base::FEATURE_DISABLED_BY_DEFAULT};
58
Tomasz Wiszkowskid938a1112019-03-06 18:01:5759// Feature used to hide the scheme from steady state URLs displayed in the
60// toolbar. It is restored during editing.
manuk06717f92020-05-29 15:38:4761const base::Feature kHideFileUrlScheme{
62 "OmniboxUIExperimentHideFileUrlScheme",
63 // Android and iOS don't have the File security chip, and therefore still
64 // need to show the file scheme.
65 enabled_by_default_desktop_only};
Tomasz Wiszkowskid938a1112019-03-06 18:01:5766
manukaddd3c42019-04-09 21:20:5967// Feature used to enable local entity suggestions. Similar to rich entities but
68// but location specific. E.g., typing 'starbucks near' could display the local
69// entity suggestion 'starbucks near disneyland \n starbucks * Anaheim, CA'.
70const base::Feature kOmniboxLocalEntitySuggestions{
71 "OmniboxLocalEntitySuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
72
Tomasz Wiszkowskid938a1112019-03-06 18:01:5773// Feature used to enable swapping the rows on answers.
74const base::Feature kOmniboxReverseAnswers{"OmniboxReverseAnswers",
75 base::FEATURE_DISABLED_BY_DEFAULT};
76
Kevin Bailey7d918b92019-05-02 16:00:1477// Feature used to enable matching short words to bookmarks for suggestions.
78const base::Feature kOmniboxShortBookmarkSuggestions{
79 "OmniboxShortBookmarkSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
80
Tomasz Wiszkowskid938a1112019-03-06 18:01:5781// Feature used to force on the experiment of transmission of tail suggestions
82// from GWS to this client, currently testing for desktop.
Filip Gorski87f1594002020-08-18 21:07:5583const base::Feature kOmniboxTailSuggestions{"OmniboxTailSuggestions",
84 base::FEATURE_DISABLED_BY_DEFAULT};
Tomasz Wiszkowskid938a1112019-03-06 18:01:5785
Kevin Bailey37bbf1d2019-08-21 19:23:5586// 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 Wiszkowskid938a1112019-03-06 18:01:5789const base::Feature kOmniboxTabSwitchSuggestions{
Filip Gorski87f1594002020-08-18 21:07:5590 "OmniboxTabSwitchSuggestions", enabled_by_default_desktop_ios};
Tomasz Wiszkowskid938a1112019-03-06 18:01:5791
Tomasz Wiszkowskid938a1112019-03-06 18:01:5792// Feature used to enable various experiments on keyword mode, UI and
93// suggestions.
94const base::Feature kExperimentalKeywordMode{"OmniboxExperimentalKeywordMode",
95 base::FEATURE_DISABLED_BY_DEFAULT};
96
Tomasz Wiszkowskid938a1112019-03-06 18:01:5797// Feature to enable clipboard provider to suggest searching for copied images.
98const base::Feature kEnableClipboardProviderImageSuggestions{
Filip Gorski87f1594002020-08-18 21:07:5599 "OmniboxEnableClipboardProviderImageSuggestions",
100 enabled_by_default_ios_only};
Tomasz Wiszkowskid938a1112019-03-06 18:01:57101
102// Feature to enable the search provider to send a request to the suggest
103// server on focus. This allows the suggest server to warm up, by, for
104// example, loading per-user models into memory. Having a per-user model
105// in memory allows the suggest server to respond more quickly with
106// personalized suggestions as the user types.
107const base::Feature kSearchProviderWarmUpOnFocus{
Filip Gorski87f1594002020-08-18 21:07:55108 "OmniboxWarmUpSearchProviderOnFocus", enabled_by_default_desktop_android};
Tomasz Wiszkowskid938a1112019-03-06 18:01:57109
Tomasz Wiszkowskid938a1112019-03-06 18:01:57110// Feature used to display the title of the current URL match.
111const base::Feature kDisplayTitleForCurrentUrl{
Filip Gorski87f1594002020-08-18 21:07:55112 "OmniboxDisplayTitleForCurrentUrl", enabled_by_default_desktop_android};
Tomasz Wiszkowskid938a1112019-03-06 18:01:57113
Tomasz Wiszkowskid938a1112019-03-06 18:01:57114// Feature used to always swap the title and URL.
115const base::Feature kUIExperimentSwapTitleAndUrl{
Filip Gorski87f1594002020-08-18 21:07:55116 "OmniboxUIExperimentSwapTitleAndUrl", enabled_by_default_desktop_only};
Tomasz Wiszkowskid938a1112019-03-06 18:01:57117
Tomasz Wiszkowskid938a1112019-03-06 18:01:57118// Feature used to enable speculatively starting a service worker associated
119// with the destination of the default match when the user's input looks like a
120// query.
121const base::Feature kSpeculativeServiceWorkerStartOnQueryInput{
Filip Gorski87f1594002020-08-18 21:07:55122 "OmniboxSpeculativeServiceWorkerStartOnQueryInput",
123 base::FEATURE_ENABLED_BY_DEFAULT};
Tomasz Wiszkowskid938a1112019-03-06 18:01:57124
125// Feature used to fetch document suggestions.
126const base::Feature kDocumentProvider{"OmniboxDocumentProvider",
127 base::FEATURE_DISABLED_BY_DEFAULT};
128
manuk4542e232019-09-11 19:27:35129// Feature used to autocomplete bookmark, history, and document suggestions when
130// the user input is a prefix of their titles, as opposed to their URLs.
131const base::Feature kAutocompleteTitles{"OmniboxAutocompleteTitles",
132 base::FEATURE_DISABLED_BY_DEFAULT};
133
Patrick Noland2b4968b2019-06-27 14:50:26134// Returns whether IsInstantExtendedAPIEnabled should be ignored when deciding
135// the number of Google-provided search suggestions.
136const base::Feature kOmniboxDisableInstantExtendedLimit{
Justin Donnellyca2d5b22020-09-03 19:37:50137 "OmniboxDisableInstantExtendedLimit", enabled_by_default_android_ios};
Patrick Noland2b4968b2019-06-27 14:50:26138
Brandon Wylief8dd4e82019-07-11 16:39:57139// Show the search engine logo in the omnibox on Android (desktop already does
140// this).
141const base::Feature kOmniboxSearchEngineLogo{"OmniboxSearchEngineLogo",
Brandon Wyliee480f8252020-07-28 19:25:01142 base::FEATURE_ENABLED_BY_DEFAULT};
Brandon Wylief8dd4e82019-07-11 16:39:57143
manukbf3c8ab2019-10-24 16:52:08144// Feature used to allow users to remove suggestions from clipboard.
145const base::Feature kOmniboxRemoveSuggestionsFromClipboard{
Filip Gorski87f1594002020-08-18 21:07:55146 "OmniboxRemoveSuggestionsFromClipboard", enabled_by_default_android_only};
manukbf3c8ab2019-10-24 16:52:08147
manukbf3c8ab2019-10-24 16:52:08148// Feature to debounce drive requests from the document provider.
149const base::Feature kDebounceDocumentProvider{
150 "OmniboxDebounceDocumentProvider", base::FEATURE_DISABLED_BY_DEFAULT};
151
Tommy Li6390ecc2019-09-06 21:08:57152// Preserves the default match against change when providers return results
153// asynchronously. This prevents the default match from changing after the user
154// finishes typing. Without this feature, if the default match is updated right
155// when the user presses Enter, the user may go to a surprising destination.
156const base::Feature kOmniboxPreserveDefaultMatchAgainstAsyncUpdate{
157 "OmniboxPreserveDefaultMatchAgainstAsyncUpdate",
Tommy Li2b9db032020-03-02 22:12:14158 base::FEATURE_ENABLED_BY_DEFAULT};
Tommy Li6390ecc2019-09-06 21:08:57159
manuk7b89f6642019-11-08 19:25:24160// Demotes the relevance scores when comparing suggestions based on the
161// suggestion's |AutocompleteMatchType| and the user's |PageClassification|.
162// This feature's main job is to contain the DemoteByType parameter.
163const base::Feature kOmniboxDemoteByType{"OmniboxDemoteByType",
164 base::FEATURE_DISABLED_BY_DEFAULT};
165
Justin Donnelly477e35e2020-04-02 14:40:00166// A special flag, enabled by default, that can be used to disable all new
167// search features (e.g. zero suggest).
168const base::Feature kNewSearchFeatures{"OmniboxNewSearchFeatures",
169 base::FEATURE_ENABLED_BY_DEFAULT};
170
manuk89d73982020-05-12 01:17:34171// Feature used to cap max zero suggestions shown according to the param
172// OmniboxMaxZeroSuggestMatches. If omitted,
173// OmniboxUIExperimentMaxAutocompleteMatches will be used instead. If present,
174// OmniboxMaxZeroSuggestMatches will override
175// OmniboxUIExperimentMaxAutocompleteMatches when |from_omnibox_focus| is true.
176const base::Feature kMaxZeroSuggestMatches{"OmniboxMaxZeroSuggestMatches",
177 base::FEATURE_DISABLED_BY_DEFAULT};
178
manuk89d73982020-05-12 01:17:34179// Feature used to cap max suggestions shown according to the params
180// UIMaxAutocompleteMatches and UIMaxAutocompleteMatchesByProvider.
181const base::Feature kUIExperimentMaxAutocompleteMatches{
182 "OmniboxUIExperimentMaxAutocompleteMatches",
183 base::FEATURE_DISABLED_BY_DEFAULT};
184
Justin Donnelly444aa062020-05-14 23:27:20185// Feature used to cap the number of URL-type matches shown within the
186// Omnibox. If enabled, the number of URL-type matches is limited (unless
187// there are no more non-URL matches available.) If enabled, there is a
188// companion parameter - OmniboxMaxURLMatches - which specifies the maximum
189// desired number of URL-type matches.
190const bool kOmniboxMaxURLMatchesEnabledByDefault =
191#if defined(OS_IOS) || defined(OS_ANDROID)
192 false;
193#else
194 true;
195#endif
196const base::Feature kOmniboxMaxURLMatches{
197 "OmniboxMaxURLMatches", kOmniboxMaxURLMatchesEnabledByDefault
198 ? base::FEATURE_ENABLED_BY_DEFAULT
199 : base::FEATURE_DISABLED_BY_DEFAULT};
200
manuk4e2979d2020-07-08 23:29:28201// Feature used to cap max suggestions to a dynamic limit based on how many URLs
202// would be shown. E.g., show up to 10 suggestions if doing so would display no
203// URLs; else show up to 8 suggestions if doing so would include 1 or more URLs.
204const base::Feature kDynamicMaxAutocomplete{"OmniboxDynamicMaxAutocomplete",
205 base::FEATURE_DISABLED_BY_DEFAULT};
206
Tommy Li354a0e42020-07-30 16:46:14207// If enabled, when the user clears the whole omnibox text (i.e. via Backspace),
Tommy Li19e27ede2020-08-14 22:52:40208// Chrome will request remote ZeroSuggest suggestions for the OTHER page
209// classification (contextual web).
210const base::Feature kClobberTriggersContextualWebZeroSuggest{
211 "OmniboxClobberTriggersContextualWebZeroSuggest",
212 base::FEATURE_DISABLED_BY_DEFAULT};
Tommy Li354a0e42020-07-30 16:46:14213
Moe Ahmadi72c8e812020-07-10 21:34:23214// Used to adjust the age threshold since the last visit in order to consider a
215// normalized keyword search term as a zero-prefix suggestion. If disabled, the
216// default value of history::kLowQualityMatchAgeLimitInDays is used. If enabled,
217// the age threshold is determined by this feature's companion parameter,
218// OmniboxFieldTrial::kOmniboxLocalZeroSuggestAgeThresholdParam.
219const base::Feature kOmniboxLocalZeroSuggestAgeThreshold{
220 "OmniboxLocalZeroSuggestAgeThreshold", base::FEATURE_DISABLED_BY_DEFAULT};
221
Moe Ahmadi064dbcd2020-08-20 01:53:31222// If enabled, ranks the local zero-prefix suggestions based on frecency
223// (combined frequency and recency).
224const base::Feature kOmniboxLocalZeroSuggestFrecencyRanking{
225 "OmniboxLocalZeroSuggestFrecencyRanking",
226 base::FEATURE_DISABLED_BY_DEFAULT};
227
228// Used to force enable/disable trending zero-prefix suggestions on the NTP
229// (Omnibox and NTP realbox). This feature triggers a server-side behavior only
230// and has no direct impact on the client behavior.
231const base::Feature kOmniboxTrendingZeroPrefixSuggestionsOnNTP{
232 "OmniboxTrendingZeroPrefixSuggestionsOnNTP",
233 base::FEATURE_DISABLED_BY_DEFAULT};
234
Tommy Lib4b3bb5b2020-05-01 02:34:56235// Feature that configures ZeroSuggestProvider using the "ZeroSuggestVariant"
236// per-page-classification parameter.
Tommy Li55784022020-04-28 20:58:18237//
Tommy Lib4b3bb5b2020-05-01 02:34:56238// Generally speaking - do NOT use this for future server-side experiments.
239// Instead, create your a new narrowly scoped base::Feature for each experiment.
240//
241// Because our Field Trial system can only configure this base::Feature in a
242// single study, and does not merge parameters, using this creates conflicts.
Tommy C. Li090105512019-05-16 22:00:56243const base::Feature kOnFocusSuggestions{"OmniboxOnFocusSuggestions",
244 base::FEATURE_ENABLED_BY_DEFAULT};
245
Tommy Li55784022020-04-28 20:58:18246// Enables on-focus suggestions on the Open Web, that are contextual to the
247// current URL. Will only work if user is signed-in and syncing, or is
248// otherwise eligible to send the current page URL to the suggest server.
Tommy Lie0a3a992020-05-29 21:32:05249//
250// There's multiple flags here for multiple backend configurations:
251// - Default (search queries)
252// - On-Content Suggestions
Tommy Li55784022020-04-28 20:58:18253const base::Feature kOnFocusSuggestionsContextualWeb{
254 "OmniboxOnFocusSuggestionsContextualWeb",
255 base::FEATURE_DISABLED_BY_DEFAULT};
Tommy Lie0a3a992020-05-29 21:32:05256const base::Feature kOnFocusSuggestionsContextualWebOnContent{
257 "OmniboxOnFocusSuggestionsContextualWebOnContent",
258 base::FEATURE_DISABLED_BY_DEFAULT};
Tommy Li55784022020-04-28 20:58:18259
Moe Ahmadi31147bc2020-06-02 19:07:56260// Enables Reactive Zero-Prefix Suggestions (rZPS) on the NTP, for the Omnibox
261// and Realbox respectively. Note: enabling this feature merely makes
Tommy Lib4b3bb5b2020-05-01 02:34:56262// ZeroSuggestProvider send the request. There are additional requirements,
Moe Ahmadi31147bc2020-06-02 19:07:56263// like the user being signed-in, and the suggest server having rZPS enabled.
264const base::Feature kReactiveZeroSuggestionsOnNTPOmnibox{
265 "OmniboxReactiveZeroSuggestionsOnNTPOmnibox",
Tommy Lib4b3bb5b2020-05-01 02:34:56266 base::FEATURE_DISABLED_BY_DEFAULT};
Moe Ahmadi31147bc2020-06-02 19:07:56267const base::Feature kReactiveZeroSuggestionsOnNTPRealbox{
268 "OmniboxReactiveZeroSuggestionsOnNTPRealbox",
Tommy Lib4b3bb5b2020-05-01 02:34:56269 base::FEATURE_DISABLED_BY_DEFAULT};
270
Tomasz Wiszkowski947f6d0d2019-03-15 22:27:25271// Allow suggestions to be shown to the user on the New Tab Page upon focusing
272// URL bar (the omnibox).
273const base::Feature kZeroSuggestionsOnNTP{"OmniboxZeroSuggestionsOnNTP",
Moe Ahmadi55b0f57c2020-08-15 01:20:03274 base::FEATURE_ENABLED_BY_DEFAULT};
Tomasz Wiszkowski947f6d0d2019-03-15 22:27:25275
Moe Ahmadi4005ec92019-09-09 16:55:53276// Allow suggestions to be shown to the user on the New Tab Page upon focusing
277// the real search box.
278const base::Feature kZeroSuggestionsOnNTPRealbox{
Moe Ahmadi55b0f57c2020-08-15 01:20:03279 "OmniboxZeroSuggestionsOnNTPRealbox", base::FEATURE_ENABLED_BY_DEFAULT};
Moe Ahmadi4005ec92019-09-09 16:55:53280
Tommy Li1d03b9bf2019-09-23 23:46:34281// Allow on-focus query refinements to be shown on the default SERP.
282const base::Feature kZeroSuggestionsOnSERP{"OmniboxZeroSuggestionsOnSERP",
283 base::FEATURE_ENABLED_BY_DEFAULT};
284
Ce Chenc8d803a2020-04-27 09:31:33285// Features to provide non personalized head search suggestion from a compact
286// on device model. More specifically, feature name with suffix Incognito /
287// NonIncognito will only controls behaviors under incognito / non-incognito
288// mode respectively.
289const base::Feature kOnDeviceHeadProviderIncognito{
290 "OmniboxOnDeviceHeadProviderIncognito", base::FEATURE_DISABLED_BY_DEFAULT};
291const base::Feature kOnDeviceHeadProviderNonIncognito{
292 "OmniboxOnDeviceHeadProviderNonIncognito",
293 base::FEATURE_DISABLED_BY_DEFAULT};
294
Justin Donnellyf2703482019-10-24 21:42:15295// If enabled, changes the way Google-provided search suggestions are scored by
296// the backend. Note that this Feature is only used for triggering a server-
297// side experiment config that will send experiment IDs to the backend. It is
298// not referred to in any of the Chromium code.
299const base::Feature kOmniboxExperimentalSuggestScoring{
300 "OmniboxExperimentalSuggestScoring", base::FEATURE_DISABLED_BY_DEFAULT};
301
manukh3bb80c92020-01-22 00:19:46302// If disabled, terms with no wordstart matches disqualify the suggestion unless
303// they occur in the URL host. If enabled, terms with no wordstart matches are
304// allowed but not scored. E.g., both inputs 'java script' and 'java cript' will
305// match a suggestion titled 'javascript' and score equivalently.
manukh5ff0f582020-01-14 03:54:13306const base::Feature kHistoryQuickProviderAllowButDoNotScoreMidwordTerms{
307 "OmniboxHistoryQuickProviderAllowButDoNotScoreMidwordTerms",
manuk8f1b1e1a2020-07-28 22:02:13308 base::FEATURE_ENABLED_BY_DEFAULT};
manukh5ff0f582020-01-14 03:54:13309
manukh3bb80c92020-01-22 00:19:46310// If disabled, midword matches are ignored except in the URL host, and input
311// terms with no wordstart matches are scored 0, resulting in an overall score
312// of 0. If enabled, midword matches are allowed and scored when they begin
313// immediately after the previous match ends. E.g. 'java script' will match a
314// suggestion titled 'javascript' but the input 'java cript' won't.
manukh5ff0f582020-01-14 03:54:13315const base::Feature kHistoryQuickProviderAllowMidwordContinuations{
316 "OmniboxHistoryQuickProviderAllowMidwordContinuations",
manuk8f1b1e1a2020-07-28 22:02:13317 base::FEATURE_ENABLED_BY_DEFAULT};
manukh5ff0f582020-01-14 03:54:13318
Tomasz Wiszkowski70fb35f2020-02-27 00:39:19319// If enabled, shows slightly more compact suggestions, allowing the
320// kAdaptiveSuggestionsCount feature to fit more suggestions on screen.
321const base::Feature kCompactSuggestions{"OmniboxCompactSuggestions",
322 base::FEATURE_DISABLED_BY_DEFAULT};
323
Tomasz Wiszkowski70fb35f2020-02-27 00:39:19324// If enabled, defers keyboard popup when user highlights the omnibox until
325// the user taps the Omnibox again.
326extern const base::Feature kDeferredKeyboardPopup{
327 "OmniboxDeferredKeyboardPopup", base::FEATURE_DISABLED_BY_DEFAULT};
328
Filip Gorskib116dee2020-08-20 14:12:10329// If enbaled, frequently visited sites are presented in form of a single row
330// with a carousel of tiles, instead of one URL per row.
331extern const base::Feature kMostVisitedTiles{"OmniboxMostVisitedTiles",
332 base::FEATURE_DISABLED_BY_DEFAULT};
333
manuk695f9d4532020-03-18 19:22:08334// If enabled, expands autocompletion to possibly (depending on params) include
335// suggestion titles and non-prefixes as opposed to be restricted to URL
336// prefixes. Will also adjust the location bar UI and omnibox text selection to
337// accommodate the autocompletions.
338const base::Feature kRichAutocompletion{"OmniboxRichAutocompletion",
339 base::FEATURE_DISABLED_BY_DEFAULT};
340
Tomasz Wiszkowski457253d32020-08-18 01:37:26341// Feature that enables Search Ready Omnibox in incognito.
Filip Gorski05279842020-06-12 12:49:02342const base::Feature kOmniboxSearchReadyIncognito{
343 "OmniboxSearchReadyIncognito", base::FEATURE_DISABLED_BY_DEFAULT};
344
Orin Jaworskifc174722020-01-29 00:32:22345// Feature that puts a single row of buttons on suggestions with actionable
346// elements like keywords, tab-switch buttons, and Pedals.
347const base::Feature kOmniboxSuggestionButtonRow{
348 "OmniboxSuggestionButtonRow", base::FEATURE_DISABLED_BY_DEFAULT};
349
Justin Donnelly5726ecf2020-08-14 00:53:52350// Feature used to enable Pedal suggestions.
351const base::Feature kOmniboxPedalSuggestions{"OmniboxPedalSuggestions",
352 base::FEATURE_DISABLED_BY_DEFAULT};
353
354// Feature used to enable the keyword search button.
355const base::Feature kOmniboxKeywordSearchButton{
356 "OmniboxKeywordSearchButton", base::FEATURE_DISABLED_BY_DEFAULT};
357
Filip Gorski927709ea2020-04-30 15:58:37358// Enables using an Android RecyclerView to render the suggestions dropdown
359// instead of a ListView.
360const base::Feature kOmniboxSuggestionsRecyclerView{
Filip Gorskieb6dbc82020-08-18 20:53:12361 "OmniboxSuggestionsRecyclerView", base::FEATURE_ENABLED_BY_DEFAULT};
Filip Gorski927709ea2020-04-30 15:58:37362
Tomasz Wiszkowski5ec4f532020-05-19 21:28:10363// Allows long Omnibox suggestions to wrap around to next line.
364const base::Feature kOmniboxSuggestionsWrapAround{
365 "OmniboxSuggestionsWrapAround", base::FEATURE_DISABLED_BY_DEFAULT};
366
Tommy Li1f1fc4a2020-01-31 21:02:07367// If enabled, uses WebUI to render the omnibox suggestions popup, similar to
368// how the NTP "fakebox" is implemented.
369const base::Feature kWebUIOmniboxPopup{"WebUIOmniboxPopup",
370 base::FEATURE_DISABLED_BY_DEFAULT};
371
Brandon Wylie1299ff82020-01-23 02:13:37372// When enabled, use Assistant for omnibox voice query recognition instead of
373// Android's built-in voice recognition service. Only works on Android.
374const base::Feature kOmniboxAssistantVoiceSearch{
375 "OmniboxAssistantVoiceSearch", base::FEATURE_DISABLED_BY_DEFAULT};
376
Livvie Lin30a9f9d2020-03-17 19:45:19377// When enabled, provides an omnibox context menu option that prevents URL
378// elisions.
379const base::Feature kOmniboxContextMenuShowFullUrls{
Livvie Lin77ff5e92020-08-18 15:45:21380 "OmniboxContextMenuShowFullUrls", base::FEATURE_ENABLED_BY_DEFAULT};
Livvie Lin30a9f9d2020-03-17 19:45:19381
Emily Stark4bca290ac2020-06-29 21:02:30382// Feature used to reveal the path, query and ref from steady state URLs
383// on hover.
384const base::Feature kRevealSteadyStateUrlPathQueryAndRefOnHover{
385 "OmniboxUIExperimentRevealSteadyStateUrlPathQueryAndRefOnHover",
386 base::FEATURE_DISABLED_BY_DEFAULT};
387
388// Feature used to hide the path, query and ref from steady state URLs
389// on interaction with the page.
390const base::Feature kHideSteadyStateUrlPathQueryAndRefOnInteraction{
391 "OmniboxUIExperimentHideSteadyStateUrlPathQueryAndRefOnInteraction",
392 base::FEATURE_DISABLED_BY_DEFAULT};
393
Joe DeBlasio6d5806e12020-08-06 17:27:18394// Feature used to possibly elide not just the path, query, and ref from steady
395// state URLs, but also subdomains beyond the registrable domain, depending on
396// whether the hostname fails lookalike checks. Has no effect unless
Emily Stark4bca290ac2020-06-29 21:02:30397// kRevealSteadyStateUrlPathQueryAndRefOnHover and/or
398// kHideSteadyStateUrlPathQueryAndRefOnInteraction are enabled.
Joe DeBlasio6d5806e12020-08-06 17:27:18399const base::Feature kMaybeElideToRegistrableDomain{
Emily Stark4bca290ac2020-06-29 21:02:30400 "OmniboxUIExperimentElideToRegistrableDomain",
401 base::FEATURE_DISABLED_BY_DEFAULT};
402
Tomasz Wiszkowskid938a1112019-03-06 18:01:57403} // namespace omnibox