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 | #ifndef COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_ |
| 6 | #define COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_ |
| 7 | |
| 8 | #include "base/feature_list.h" |
| 9 | |
| 10 | namespace omnibox { |
| 11 | |
Tommy Li | 7c2bf49 | 2019-10-22 19:34:23 | [diff] [blame] | 12 | // 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 Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 15 | extern const base::Feature kHideFileUrlScheme; |
Kevin Bailey | 7d918b9 | 2019-05-02 16:00:14 | [diff] [blame] | 16 | extern const base::Feature kOmniboxShortBookmarkSuggestions; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 17 | extern const base::Feature kOmniboxTailSuggestions; |
| 18 | extern const base::Feature kOmniboxTabSwitchSuggestions; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 19 | extern const base::Feature kExperimentalKeywordMode; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 20 | extern const base::Feature kEnableClipboardProviderImageSuggestions; |
| 21 | extern const base::Feature kSearchProviderWarmUpOnFocus; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 22 | extern const base::Feature kDisplayTitleForCurrentUrl; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 23 | extern const base::Feature kUIExperimentSwapTitleAndUrl; |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 24 | extern const base::Feature kSpeculativeServiceWorkerStartOnQueryInput; |
| 25 | extern const base::Feature kDocumentProvider; |
Patrick Noland | 2b4968b | 2019-06-27 14:50:26 | [diff] [blame] | 26 | extern const base::Feature kOmniboxDisableInstantExtendedLimit; |
Brandon Wylie | f8dd4e8 | 2019-07-11 16:39:57 | [diff] [blame] | 27 | extern const base::Feature kOmniboxSearchEngineLogo; |
Gang Wu | ba18dba | 2019-09-25 03:43:21 | [diff] [blame] | 28 | extern const base::Feature kOmniboxRemoveSuggestionsFromClipboard; |
manuk | bf3c8ab | 2019-10-24 16:52:08 | [diff] [blame] | 29 | extern const base::Feature kDebounceDocumentProvider; |
Tommy C. Li | 09010551 | 2019-05-16 22:00:56 | [diff] [blame] | 30 | |
Tommy Li | 6390ecc | 2019-09-06 21:08:57 | [diff] [blame] | 31 | // Flags that affect the "twiddle" step of AutocompleteResult, i.e. SortAndCull. |
| 32 | // TODO(tommycli): There are more flags above that belong in this category. |
manuk | 7b89f664 | 2019-11-08 19:25:24 | [diff] [blame] | 33 | extern const base::Feature kOmniboxDemoteByType; |
Tommy Li | 6390ecc | 2019-09-06 21:08:57 | [diff] [blame] | 34 | |
Justin Donnelly | 477e35e | 2020-04-02 14:40:00 | [diff] [blame] | 35 | // A special flag, enabled by default, that can be used to disable all new |
| 36 | // search features (e.g. zero suggest). |
| 37 | extern const base::Feature kNewSearchFeatures; |
| 38 | |
manukh | 7a2bc53 | 2020-09-08 15:52:25 | [diff] [blame] | 39 | // Features below this line should be sorted alphabetically by their comments. |
| 40 | |
| 41 | // Entity suggestion features. |
manukh | 7a2bc53 | 2020-09-08 15:52:25 | [diff] [blame] | 42 | extern const base::Feature kEntitySuggestionsReduceLatency; |
| 43 | |
manuk | 89d7398 | 2020-05-12 01:17:34 | [diff] [blame] | 44 | // Num suggestions - these affect how many suggestions are shown based on e.g. |
| 45 | // focus, page context, provider, or URL v non-URL. |
manukh | d187041 | 2020-09-15 03:42:14 | [diff] [blame] | 46 | // Note that all of these are overridden and default values used instead if |
Justin Donnelly | 444aa06 | 2020-05-14 23:27:20 | [diff] [blame] | 47 | // kNewSearchFeatures is disabled. |
manuk | 89d7398 | 2020-05-12 01:17:34 | [diff] [blame] | 48 | extern const base::Feature kMaxZeroSuggestMatches; |
manuk | 89d7398 | 2020-05-12 01:17:34 | [diff] [blame] | 49 | extern const base::Feature kUIExperimentMaxAutocompleteMatches; |
Justin Donnelly | 444aa06 | 2020-05-14 23:27:20 | [diff] [blame] | 50 | // The default value is established here as a bool so it can be referred to in |
| 51 | // OmniboxFieldTrial. |
| 52 | extern const bool kOmniboxMaxURLMatchesEnabledByDefault; |
| 53 | extern const base::Feature kOmniboxMaxURLMatches; |
manuk | 4e2979d | 2020-07-08 23:29:28 | [diff] [blame] | 54 | extern const base::Feature kDynamicMaxAutocomplete; |
manuk | 89d7398 | 2020-05-12 01:17:34 | [diff] [blame] | 55 | |
manukh | d187041 | 2020-09-15 03:42:14 | [diff] [blame] | 56 | // Ranking |
| 57 | extern const base::Feature kBubbleUrlSuggestions; |
| 58 | |
Tommy C. Li | 09010551 | 2019-05-16 22:00:56 | [diff] [blame] | 59 | // On-Focus Suggestions a.k.a. ZeroSuggest. |
Tommy Li | 19e27ede | 2020-08-14 22:52:40 | [diff] [blame] | 60 | extern const base::Feature kClobberTriggersContextualWebZeroSuggest; |
Moe Ahmadi | 72c8e81 | 2020-07-10 21:34:23 | [diff] [blame] | 61 | extern const base::Feature kOmniboxLocalZeroSuggestAgeThreshold; |
Moe Ahmadi | 5482326 | 2020-10-13 03:00:41 | [diff] [blame] | 62 | extern const base::Feature kOmniboxLocalZeroSuggestForAuthenticatedUsers; |
Moe Ahmadi | 38b04ce3d | 2020-07-09 22:14:15 | [diff] [blame] | 63 | extern const base::Feature kOmniboxLocalZeroSuggestFrecencyRanking; |
Moe Ahmadi | 064dbcd | 2020-08-20 01:53:31 | [diff] [blame] | 64 | extern const base::Feature kOmniboxTrendingZeroPrefixSuggestionsOnNTP; |
Tommy C. Li | 09010551 | 2019-05-16 22:00:56 | [diff] [blame] | 65 | extern const base::Feature kOnFocusSuggestions; |
Tommy Li | 5578402 | 2020-04-28 20:58:18 | [diff] [blame] | 66 | extern const base::Feature kOnFocusSuggestionsContextualWeb; |
Tommy Li | e0a3a99 | 2020-05-29 21:32:05 | [diff] [blame] | 67 | extern const base::Feature kOnFocusSuggestionsContextualWebOnContent; |
Moe Ahmadi | 31147bc | 2020-06-02 19:07:56 | [diff] [blame] | 68 | extern const base::Feature kReactiveZeroSuggestionsOnNTPOmnibox; |
| 69 | extern const base::Feature kReactiveZeroSuggestionsOnNTPRealbox; |
Tomasz Wiszkowski | 947f6d0d | 2019-03-15 22:27:25 | [diff] [blame] | 70 | extern const base::Feature kZeroSuggestionsOnNTP; |
Moe Ahmadi | 4005ec9 | 2019-09-09 16:55:53 | [diff] [blame] | 71 | extern const base::Feature kZeroSuggestionsOnNTPRealbox; |
Tommy Li | 1d03b9bf | 2019-09-23 23:46:34 | [diff] [blame] | 72 | extern const base::Feature kZeroSuggestionsOnSERP; |
manuk | fdd9740 | 2020-07-22 18:19:17 | [diff] [blame] | 73 | // Related, kMaxZeroSuggestMatches. |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 74 | |
Ce Chen | c8d803a | 2020-04-27 09:31:33 | [diff] [blame] | 75 | // On Device Head Suggest. |
| 76 | extern const base::Feature kOnDeviceHeadProviderIncognito; |
| 77 | extern const base::Feature kOnDeviceHeadProviderNonIncognito; |
| 78 | |
Justin Donnelly | f270348 | 2019-10-24 21:42:15 | [diff] [blame] | 79 | // Scoring - these affect how relevance scores are calculated for suggestions. |
| 80 | extern const base::Feature kOmniboxExperimentalSuggestScoring; |
manukh | 5ff0f58 | 2020-01-14 03:54:13 | [diff] [blame] | 81 | extern const base::Feature kHistoryQuickProviderAllowButDoNotScoreMidwordTerms; |
| 82 | extern const base::Feature kHistoryQuickProviderAllowMidwordContinuations; |
Justin Donnelly | f270348 | 2019-10-24 21:42:15 | [diff] [blame] | 83 | |
Tommy Li | 7c2bf49 | 2019-10-22 19:34:23 | [diff] [blame] | 84 | // Suggestions UI - these affect the UI or function of the suggestions popup. |
Tomasz Wiszkowski | 8a0e0dc4 | 2020-02-19 00:06:37 | [diff] [blame] | 85 | extern const base::Feature kAdaptiveSuggestionsCount; |
manukh | 61e78251 | 2020-10-01 17:33:45 | [diff] [blame] | 86 | extern const base::Feature kBookmarkPaths; |
Tomasz Wiszkowski | 70fb35f | 2020-02-27 00:39:19 | [diff] [blame] | 87 | extern const base::Feature kCompactSuggestions; |
Tomasz Wiszkowski | 70fb35f | 2020-02-27 00:39:19 | [diff] [blame] | 88 | extern const base::Feature kDeferredKeyboardPopup; |
Filip Gorski | b116dee | 2020-08-20 14:12:10 | [diff] [blame] | 89 | extern const base::Feature kMostVisitedTiles; |
manuk | 695f9d453 | 2020-03-18 19:22:08 | [diff] [blame] | 90 | extern const base::Feature kRichAutocompletion; |
Filip Gorski | 0527984 | 2020-06-12 12:49:02 | [diff] [blame] | 91 | extern const base::Feature kOmniboxSearchReadyIncognito; |
Orin Jaworski | fc17472 | 2020-01-29 00:32:22 | [diff] [blame] | 92 | extern const base::Feature kOmniboxSuggestionButtonRow; |
Justin Donnelly | 5726ecf | 2020-08-14 00:53:52 | [diff] [blame] | 93 | extern const base::Feature kOmniboxPedalSuggestions; |
| 94 | extern const base::Feature kOmniboxKeywordSearchButton; |
Angela Yoeurng | 8155263 | 2020-09-22 23:52:14 | [diff] [blame] | 95 | extern const base::Feature kOmniboxRefinedFocusState; |
Filip Gorski | 927709ea | 2020-04-30 15:58:37 | [diff] [blame] | 96 | extern const base::Feature kOmniboxSuggestionsRecyclerView; |
Tomasz Wiszkowski | 5ec4f53 | 2020-05-19 21:28:10 | [diff] [blame] | 97 | extern const base::Feature kOmniboxSuggestionsWrapAround; |
Tommy Li | 1f1fc4a | 2020-01-31 21:02:07 | [diff] [blame] | 98 | extern const base::Feature kWebUIOmniboxPopup; |
Kevin Bailey | 104e4449 | 2019-10-31 16:42:32 | [diff] [blame] | 99 | |
Brandon Wylie | 1299ff8 | 2020-01-23 02:13:37 | [diff] [blame] | 100 | // Omnibox UI - these affect the UI or function of the location bar (not the |
| 101 | // popup). |
| 102 | extern const base::Feature kOmniboxAssistantVoiceSearch; |
Brandon Wylie | 1299ff8 | 2020-01-23 02:13:37 | [diff] [blame] | 103 | |
Emily Stark | 4bca290ac | 2020-06-29 21:02:30 | [diff] [blame] | 104 | // Path-hiding experiments - these hide the path and other URL components in |
| 105 | // some circumstances in the steady-state omnibox. |
| 106 | extern const base::Feature kRevealSteadyStateUrlPathQueryAndRefOnHover; |
| 107 | extern const base::Feature kHideSteadyStateUrlPathQueryAndRefOnInteraction; |
Joe DeBlasio | 6d5806e1 | 2020-08-06 17:27:18 | [diff] [blame] | 108 | extern const base::Feature kMaybeElideToRegistrableDomain; |
Emily Stark | 4bca290ac | 2020-06-29 21:02:30 | [diff] [blame] | 109 | |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 110 | } // namespace omnibox |
| 111 | |
| 112 | #endif // COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_ |