[iOS] Add switch to change the search icon
This CL adds a switch enum to chrome://flags to change the icon
displayed by the search button in the bottom toolbar.
Bug: 866013
Change-Id: I1892cb02f42bc6d1324e276b9022663e48b45b3b
Reviewed-on: https://chromium-review.googlesource.com/c/1297972
Commit-Queue: Gauthier Ambard <[email protected]>
Reviewed-by: Mark Cogan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#602361}
diff --git a/ios/chrome/browser/about_flags.mm b/ios/chrome/browser/about_flags.mm
index e8f8faf3..bf618c1 100644
--- a/ios/chrome/browser/about_flags.mm
+++ b/ios/chrome/browser/about_flags.mm
@@ -132,6 +132,24 @@
{"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
};
+const FeatureEntry::FeatureParam kIconForSearchButtonGrey[] = {
+ {kIconForSearchButtonFeatureParameterName,
+ kIconForSearchButtonParameterGrey}};
+const FeatureEntry::FeatureParam kIconForSearchButtonColorful[] = {
+ {kIconForSearchButtonFeatureParameterName,
+ kIconForSearchButtonParameterColorful}};
+const FeatureEntry::FeatureParam kIconForSearchButtonMagnifying[] = {
+ {kIconForSearchButtonFeatureParameterName,
+ kIconForSearchButtonParameterMagnifying}};
+
+const FeatureEntry::FeatureVariation kIconForSearchButtonVariations[] = {
+ {"Grey search engine logo", kIconForSearchButtonGrey,
+ base::size(kIconForSearchButtonGrey), nullptr},
+ {"Colorful search engine logo", kIconForSearchButtonColorful,
+ base::size(kIconForSearchButtonColorful), nullptr},
+ {"Magnifying glass", kIconForSearchButtonMagnifying,
+ base::size(kIconForSearchButtonMagnifying), nullptr}};
+
// To add a new entry, add to the end of kFeatureEntries. There are four
// distinct types of entries:
// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
@@ -391,6 +409,11 @@
flag_descriptions::kBrowserContainerContainsNTPName,
flag_descriptions::kBrowserContainerContainsNTPDescription,
flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBrowserContainerContainsNTP)},
+ {"search-icon-toggle", flag_descriptions::kSearchIconToggleName,
+ flag_descriptions::kSearchIconToggleDescription, flags_ui::kOsIos,
+ FEATURE_WITH_PARAMS_VALUE_TYPE(kIconForSearchButtonFeature,
+ kIconForSearchButtonVariations,
+ "ToggleSearchButtonIcon")},
};
// Add all switches from experimental flags to |command_line|.