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