blob: c5adf3fe24f17406879ce366f18e3a29637f1df2 [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#ifndef COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_
6#define COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_
7
8#include "base/feature_list.h"
9
10namespace omnibox {
11
Tommy Li7c2bf492019-10-22 19:34:2312// Please do not add more features to this "big blob" list.
13// Instead, use the categorized and alphabetized lists below this "big blob".
14// You can create a new category if none of the existing ones fit.
Tomasz Wiszkowskid938a1112019-03-06 18:01:5715extern const base::Feature kHideFileUrlScheme;
Kevin Bailey7d918b92019-05-02 16:00:1416extern const base::Feature kOmniboxShortBookmarkSuggestions;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5717extern const base::Feature kOmniboxTailSuggestions;
18extern const base::Feature kOmniboxTabSwitchSuggestions;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5719extern const base::Feature kExperimentalKeywordMode;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5720extern const base::Feature kEnableClipboardProviderImageSuggestions;
21extern const base::Feature kSearchProviderWarmUpOnFocus;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5722extern const base::Feature kDisplayTitleForCurrentUrl;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5723extern const base::Feature kUIExperimentSwapTitleAndUrl;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5724extern const base::Feature kSpeculativeServiceWorkerStartOnQueryInput;
25extern const base::Feature kDocumentProvider;
manuk4542e232019-09-11 19:27:3526extern const base::Feature kAutocompleteTitles;
Patrick Noland2b4968b2019-06-27 14:50:2627extern const base::Feature kOmniboxDisableInstantExtendedLimit;
Brandon Wylief8dd4e82019-07-11 16:39:5728extern const base::Feature kOmniboxSearchEngineLogo;
Gang Wuba18dba2019-09-25 03:43:2129extern const base::Feature kOmniboxRemoveSuggestionsFromClipboard;
manukbf3c8ab2019-10-24 16:52:0830extern const base::Feature kDebounceDocumentProvider;
Tommy C. Li090105512019-05-16 22:00:5631
Tommy Li6390ecc2019-09-06 21:08:5732// Flags that affect the "twiddle" step of AutocompleteResult, i.e. SortAndCull.
33// TODO(tommycli): There are more flags above that belong in this category.
manuk7b89f6642019-11-08 19:25:2434extern const base::Feature kOmniboxDemoteByType;
Tommy Li6390ecc2019-09-06 21:08:5735
Justin Donnelly477e35e2020-04-02 14:40:0036// A special flag, enabled by default, that can be used to disable all new
37// search features (e.g. zero suggest).
38extern const base::Feature kNewSearchFeatures;
39
manukh7a2bc532020-09-08 15:52:2540// Features below this line should be sorted alphabetically by their comments.
41
42// Entity suggestion features.
manukh7a2bc532020-09-08 15:52:2543extern const base::Feature kEntitySuggestionsReduceLatency;
44
manuk89d73982020-05-12 01:17:3445// Num suggestions - these affect how many suggestions are shown based on e.g.
46// focus, page context, provider, or URL v non-URL.
manukhd1870412020-09-15 03:42:1447// Note that all of these are overridden and default values used instead if
Justin Donnelly444aa062020-05-14 23:27:2048// kNewSearchFeatures is disabled.
manuk89d73982020-05-12 01:17:3449extern const base::Feature kMaxZeroSuggestMatches;
manuk89d73982020-05-12 01:17:3450extern const base::Feature kUIExperimentMaxAutocompleteMatches;
Justin Donnelly444aa062020-05-14 23:27:2051// The default value is established here as a bool so it can be referred to in
52// OmniboxFieldTrial.
53extern const bool kOmniboxMaxURLMatchesEnabledByDefault;
54extern const base::Feature kOmniboxMaxURLMatches;
manuk4e2979d2020-07-08 23:29:2855extern const base::Feature kDynamicMaxAutocomplete;
manuk89d73982020-05-12 01:17:3456
manukhd1870412020-09-15 03:42:1457// Ranking
58extern const base::Feature kBubbleUrlSuggestions;
59
Tommy C. Li090105512019-05-16 22:00:5660// On-Focus Suggestions a.k.a. ZeroSuggest.
Tommy Li19e27ede2020-08-14 22:52:4061extern const base::Feature kClobberTriggersContextualWebZeroSuggest;
Moe Ahmadi72c8e812020-07-10 21:34:2362extern const base::Feature kOmniboxLocalZeroSuggestAgeThreshold;
Moe Ahmadi38b04ce3d2020-07-09 22:14:1563extern const base::Feature kOmniboxLocalZeroSuggestFrecencyRanking;
Moe Ahmadi064dbcd2020-08-20 01:53:3164extern const base::Feature kOmniboxTrendingZeroPrefixSuggestionsOnNTP;
Tommy C. Li090105512019-05-16 22:00:5665extern const base::Feature kOnFocusSuggestions;
Tommy Li55784022020-04-28 20:58:1866extern const base::Feature kOnFocusSuggestionsContextualWeb;
Tommy Lie0a3a992020-05-29 21:32:0567extern const base::Feature kOnFocusSuggestionsContextualWebOnContent;
Moe Ahmadi31147bc2020-06-02 19:07:5668extern const base::Feature kReactiveZeroSuggestionsOnNTPOmnibox;
69extern const base::Feature kReactiveZeroSuggestionsOnNTPRealbox;
Tomasz Wiszkowski947f6d0d2019-03-15 22:27:2570extern const base::Feature kZeroSuggestionsOnNTP;
Moe Ahmadi4005ec92019-09-09 16:55:5371extern const base::Feature kZeroSuggestionsOnNTPRealbox;
Tommy Li1d03b9bf2019-09-23 23:46:3472extern const base::Feature kZeroSuggestionsOnSERP;
manukfdd97402020-07-22 18:19:1773// Related, kMaxZeroSuggestMatches.
Tomasz Wiszkowskid938a1112019-03-06 18:01:5774
Ce Chenc8d803a2020-04-27 09:31:3375// On Device Head Suggest.
76extern const base::Feature kOnDeviceHeadProviderIncognito;
77extern const base::Feature kOnDeviceHeadProviderNonIncognito;
78
Justin Donnellyf2703482019-10-24 21:42:1579// Scoring - these affect how relevance scores are calculated for suggestions.
80extern const base::Feature kOmniboxExperimentalSuggestScoring;
manukh5ff0f582020-01-14 03:54:1381extern const base::Feature kHistoryQuickProviderAllowButDoNotScoreMidwordTerms;
82extern const base::Feature kHistoryQuickProviderAllowMidwordContinuations;
Justin Donnellyf2703482019-10-24 21:42:1583
Tommy Li7c2bf492019-10-22 19:34:2384// Suggestions UI - these affect the UI or function of the suggestions popup.
Tomasz Wiszkowski8a0e0dc42020-02-19 00:06:3785extern const base::Feature kAdaptiveSuggestionsCount;
Tomasz Wiszkowski70fb35f2020-02-27 00:39:1986extern const base::Feature kCompactSuggestions;
Tomasz Wiszkowski70fb35f2020-02-27 00:39:1987extern const base::Feature kDeferredKeyboardPopup;
Filip Gorskib116dee2020-08-20 14:12:1088extern const base::Feature kMostVisitedTiles;
manuk695f9d4532020-03-18 19:22:0889extern const base::Feature kRichAutocompletion;
Filip Gorski05279842020-06-12 12:49:0290extern const base::Feature kOmniboxSearchReadyIncognito;
Orin Jaworskifc174722020-01-29 00:32:2291extern const base::Feature kOmniboxSuggestionButtonRow;
Justin Donnelly5726ecf2020-08-14 00:53:5292extern const base::Feature kOmniboxPedalSuggestions;
93extern const base::Feature kOmniboxKeywordSearchButton;
Filip Gorski927709ea2020-04-30 15:58:3794extern const base::Feature kOmniboxSuggestionsRecyclerView;
Tomasz Wiszkowski5ec4f532020-05-19 21:28:1095extern const base::Feature kOmniboxSuggestionsWrapAround;
Tommy Li1f1fc4a2020-01-31 21:02:0796extern const base::Feature kWebUIOmniboxPopup;
Kevin Bailey104e44492019-10-31 16:42:3297
Brandon Wylie1299ff82020-01-23 02:13:3798// Omnibox UI - these affect the UI or function of the location bar (not the
99// popup).
100extern const base::Feature kOmniboxAssistantVoiceSearch;
Brandon Wylie1299ff82020-01-23 02:13:37101
Emily Stark4bca290ac2020-06-29 21:02:30102// Path-hiding experiments - these hide the path and other URL components in
103// some circumstances in the steady-state omnibox.
104extern const base::Feature kRevealSteadyStateUrlPathQueryAndRefOnHover;
105extern const base::Feature kHideSteadyStateUrlPathQueryAndRefOnInteraction;
Joe DeBlasio6d5806e12020-08-06 17:27:18106extern const base::Feature kMaybeElideToRegistrableDomain;
Emily Stark4bca290ac2020-06-29 21:02:30107
Tomasz Wiszkowskid938a1112019-03-06 18:01:57108} // namespace omnibox
109
110#endif // COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_