Commit fc174723 authored by Orin Jaworski's avatar Orin Jaworski Committed by Commit Bot

[omnibox] Add suggestion button row feature flag

This CL creates the OmniboxButtonRow feature flag for command-line.

Change-Id: I483bd37c212f0ff9bb558c170885ef71940aa77a
Bug: 1046523
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024031
Commit-Queue: Orin Jaworski <orinj@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736157}
parent f449bb8e
...@@ -650,6 +650,10 @@ bool OmniboxFieldTrial::IsShortBookmarkSuggestionsEnabled() { ...@@ -650,6 +650,10 @@ bool OmniboxFieldTrial::IsShortBookmarkSuggestionsEnabled() {
base::FeatureList::IsEnabled(omnibox::kAutocompleteTitles); base::FeatureList::IsEnabled(omnibox::kAutocompleteTitles);
} }
bool OmniboxFieldTrial::IsSuggestionButtonRowEnabled() {
return base::FeatureList::IsEnabled(omnibox::kOmniboxSuggestionButtonRow);
}
bool OmniboxFieldTrial::IsTabSwitchSuggestionsEnabled() { bool OmniboxFieldTrial::IsTabSwitchSuggestionsEnabled() {
return base::FeatureList::IsEnabled(omnibox::kOmniboxTabSwitchSuggestions); return base::FeatureList::IsEnabled(omnibox::kOmniboxTabSwitchSuggestions);
} }
......
...@@ -383,6 +383,10 @@ bool IsReverseAnswersEnabled(); ...@@ -383,6 +383,10 @@ bool IsReverseAnswersEnabled();
// Returns true if the short bookmark suggestions flag is enabled. // Returns true if the short bookmark suggestions flag is enabled.
bool IsShortBookmarkSuggestionsEnabled(); bool IsShortBookmarkSuggestionsEnabled();
// Whether a single row of buttons is shown on suggestions with actionable
// elements like keywords, tab-switch buttons, and Pedals.
bool IsSuggestionButtonRowEnabled();
// Returns true if either the tab switch suggestions flag is enabled. // Returns true if either the tab switch suggestions flag is enabled.
bool IsTabSwitchSuggestionsEnabled(); bool IsTabSwitchSuggestionsEnabled();
......
...@@ -316,16 +316,21 @@ const base::Feature kHistoryQuickProviderAllowMidwordContinuations{ ...@@ -316,16 +316,21 @@ const base::Feature kHistoryQuickProviderAllowMidwordContinuations{
const base::Feature kConfirmOmniboxSuggestionRemovals{ const base::Feature kConfirmOmniboxSuggestionRemovals{
"ConfirmOmniboxSuggestionRemovals", base::FEATURE_DISABLED_BY_DEFAULT}; "ConfirmOmniboxSuggestionRemovals", base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, allows Tab and Shift+Tab to escape the focus out of the omnibox
// popup. Otherwise, Tab infinitely loops between suggestions in the popup.
const base::Feature kTabKeyCanEscapeOmniboxPopup{
"TabKeyCanEscapeOmniboxPopup", base::FEATURE_DISABLED_BY_DEFAULT};
// Feature that enables not counting submatches towards the maximum // Feature that enables not counting submatches towards the maximum
// suggestion limit. // suggestion limit.
const base::Feature kOmniboxLooseMaxLimitOnDedicatedRows{ const base::Feature kOmniboxLooseMaxLimitOnDedicatedRows{
"OmniboxLooseMaxLimitOnDedicatedRows", base::FEATURE_DISABLED_BY_DEFAULT}; "OmniboxLooseMaxLimitOnDedicatedRows", base::FEATURE_DISABLED_BY_DEFAULT};
// Feature that puts a single row of buttons on suggestions with actionable
// elements like keywords, tab-switch buttons, and Pedals.
const base::Feature kOmniboxSuggestionButtonRow{
"OmniboxSuggestionButtonRow", base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, allows Tab and Shift+Tab to escape the focus out of the omnibox
// popup. Otherwise, Tab infinitely loops between suggestions in the popup.
const base::Feature kTabKeyCanEscapeOmniboxPopup{
"TabKeyCanEscapeOmniboxPopup", base::FEATURE_DISABLED_BY_DEFAULT};
// When enabled, use Assistant for omnibox voice query recognition instead of // When enabled, use Assistant for omnibox voice query recognition instead of
// Android's built-in voice recognition service. Only works on Android. // Android's built-in voice recognition service. Only works on Android.
const base::Feature kOmniboxAssistantVoiceSearch{ const base::Feature kOmniboxAssistantVoiceSearch{
......
...@@ -65,11 +65,9 @@ extern const base::Feature kHistoryQuickProviderAllowMidwordContinuations; ...@@ -65,11 +65,9 @@ extern const base::Feature kHistoryQuickProviderAllowMidwordContinuations;
// Suggestions UI - these affect the UI or function of the suggestions popup. // Suggestions UI - these affect the UI or function of the suggestions popup.
extern const base::Feature kConfirmOmniboxSuggestionRemovals; extern const base::Feature kConfirmOmniboxSuggestionRemovals;
extern const base::Feature kTabKeyCanEscapeOmniboxPopup;
// Flags related to new rows and managing rows in the Omnibox.
// TODO(krb): Move more flags here.
extern const base::Feature kOmniboxLooseMaxLimitOnDedicatedRows; extern const base::Feature kOmniboxLooseMaxLimitOnDedicatedRows;
extern const base::Feature kOmniboxSuggestionButtonRow;
extern const base::Feature kTabKeyCanEscapeOmniboxPopup;
// Omnibox UI - these affect the UI or function of the location bar (not the // Omnibox UI - these affect the UI or function of the location bar (not the
// popup). // popup).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment