blob: 8632ddb065dada7409deaab88974128fbad65b79 [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;
16extern const base::Feature kHideSteadyStateUrlScheme;
17extern const base::Feature kHideSteadyStateUrlTrivialSubdomains;
18extern const base::Feature kHideSteadyStateUrlPathQueryAndRef;
manukaddd3c42019-04-09 21:20:5919extern const base::Feature kOmniboxLocalEntitySuggestions;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5720extern const base::Feature kOmniboxReverseAnswers;
Kevin Bailey7d918b92019-05-02 16:00:1421extern const base::Feature kOmniboxShortBookmarkSuggestions;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5722extern const base::Feature kOmniboxTailSuggestions;
23extern const base::Feature kOmniboxTabSwitchSuggestions;
Kevin Bailey37bbf1d2019-08-21 19:23:5524extern const base::Feature kOmniboxTabSwitchSuggestionsDedicatedRow;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5725extern const base::Feature kExperimentalKeywordMode;
26extern const base::Feature kOmniboxPedalSuggestions;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5727extern const base::Feature kEnableClipboardProviderImageSuggestions;
28extern const base::Feature kSearchProviderWarmUpOnFocus;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5729extern const base::Feature kDisplayTitleForCurrentUrl;
manukbf3c8ab2019-10-24 16:52:0830extern const base::Feature kQueryInOmnibox;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5731extern const base::Feature kUIExperimentSwapTitleAndUrl;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5732extern const base::Feature kSpeculativeServiceWorkerStartOnQueryInput;
33extern const base::Feature kDocumentProvider;
manuk4542e232019-09-11 19:27:3534extern const base::Feature kAutocompleteTitles;
Patrick Noland2b4968b2019-06-27 14:50:2635extern const base::Feature kOmniboxDisableInstantExtendedLimit;
Brandon Wylief8dd4e82019-07-11 16:39:5736extern const base::Feature kOmniboxSearchEngineLogo;
Gang Wuba18dba2019-09-25 03:43:2137extern const base::Feature kOmniboxRemoveSuggestionsFromClipboard;
manukbf3c8ab2019-10-24 16:52:0838extern const base::Feature kDebounceDocumentProvider;
Tommy C. Li090105512019-05-16 22:00:5639
Tommy Li6390ecc2019-09-06 21:08:5740// Flags that affect the "twiddle" step of AutocompleteResult, i.e. SortAndCull.
41// TODO(tommycli): There are more flags above that belong in this category.
Tommy Li6390ecc2019-09-06 21:08:5742extern const base::Feature kOmniboxPreserveDefaultMatchAgainstAsyncUpdate;
manuk7b89f6642019-11-08 19:25:2443extern const base::Feature kOmniboxDemoteByType;
Tommy Li6390ecc2019-09-06 21:08:5744
Justin Donnelly477e35e2020-04-02 14:40:0045// A special flag, enabled by default, that can be used to disable all new
46// search features (e.g. zero suggest).
47extern const base::Feature kNewSearchFeatures;
48
manuk89d73982020-05-12 01:17:3449// Num suggestions - these affect how many suggestions are shown based on e.g.
50// focus, page context, provider, or URL v non-URL.
Justin Donnelly444aa062020-05-14 23:27:2051// Note that all of these are overriden and default values used instead if
52// kNewSearchFeatures is disabled.
manuk89d73982020-05-12 01:17:3453extern const base::Feature kMaxZeroSuggestMatches;
manuk89d73982020-05-12 01:17:3454extern const base::Feature kUIExperimentMaxAutocompleteMatches;
Justin Donnelly444aa062020-05-14 23:27:2055// The default value is established here as a bool so it can be referred to in
56// OmniboxFieldTrial.
57extern const bool kOmniboxMaxURLMatchesEnabledByDefault;
58extern const base::Feature kOmniboxMaxURLMatches;
manuk89d73982020-05-12 01:17:3459
Tommy C. Li090105512019-05-16 22:00:5660// On-Focus Suggestions a.k.a. ZeroSuggest.
61extern const base::Feature kOnFocusSuggestions;
Tommy Li55784022020-04-28 20:58:1862extern const base::Feature kOnFocusSuggestionsContextualWeb;
Tommy Lie0a3a992020-05-29 21:32:0563extern const base::Feature kOnFocusSuggestionsContextualWebOnContent;
Tommy Lib4b3bb5b2020-05-01 02:34:5664extern const base::Feature kProactiveZeroSuggestionsOnNTPOmnibox;
65extern const base::Feature kProactiveZeroSuggestionsOnNTPRealbox;
Tomasz Wiszkowski947f6d0d2019-03-15 22:27:2566extern const base::Feature kZeroSuggestionsOnNTP;
Moe Ahmadi4005ec92019-09-09 16:55:5367extern const base::Feature kZeroSuggestionsOnNTPRealbox;
Tommy Li1d03b9bf2019-09-23 23:46:3468extern const base::Feature kZeroSuggestionsOnSERP;
Tomasz Wiszkowskid938a1112019-03-06 18:01:5769
Ce Chenc8d803a2020-04-27 09:31:3370// On Device Head Suggest.
71extern const base::Feature kOnDeviceHeadProviderIncognito;
72extern const base::Feature kOnDeviceHeadProviderNonIncognito;
73
Justin Donnellyf2703482019-10-24 21:42:1574// Scoring - these affect how relevance scores are calculated for suggestions.
75extern const base::Feature kOmniboxExperimentalSuggestScoring;
manukh5ff0f582020-01-14 03:54:1376extern const base::Feature kHistoryQuickProviderAllowButDoNotScoreMidwordTerms;
77extern const base::Feature kHistoryQuickProviderAllowMidwordContinuations;
Justin Donnellyf2703482019-10-24 21:42:1578
Tommy Li7c2bf492019-10-22 19:34:2379// Suggestions UI - these affect the UI or function of the suggestions popup.
Tomasz Wiszkowski8a0e0dc42020-02-19 00:06:3780extern const base::Feature kAdaptiveSuggestionsCount;
Tomasz Wiszkowski70fb35f2020-02-27 00:39:1981extern const base::Feature kCompactSuggestions;
Tomasz Wiszkowski70fb35f2020-02-27 00:39:1982extern const base::Feature kDeferredKeyboardPopup;
manuk695f9d4532020-03-18 19:22:0883extern const base::Feature kRichAutocompletion;
Kevin Bailey104e44492019-10-31 16:42:3284extern const base::Feature kOmniboxLooseMaxLimitOnDedicatedRows;
Orin Jaworskifc174722020-01-29 00:32:2285extern const base::Feature kOmniboxSuggestionButtonRow;
Filip Gorski927709ea2020-04-30 15:58:3786extern const base::Feature kOmniboxSuggestionsRecyclerView;
Tomasz Wiszkowski5ec4f532020-05-19 21:28:1087extern const base::Feature kOmniboxSuggestionsWrapAround;
Tommy Li1f1fc4a2020-01-31 21:02:0788extern const base::Feature kWebUIOmniboxPopup;
Kevin Bailey104e44492019-10-31 16:42:3289
Brandon Wylie1299ff82020-01-23 02:13:3790// Omnibox UI - these affect the UI or function of the location bar (not the
91// popup).
92extern const base::Feature kOmniboxAssistantVoiceSearch;
Livvie Lin30a9f9d2020-03-17 19:45:1993extern const base::Feature kOmniboxContextMenuShowFullUrls;
Brandon Wylie1299ff82020-01-23 02:13:3794
Tomasz Wiszkowskid938a1112019-03-06 18:01:5795} // namespace omnibox
96
97#endif // COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_