Reland "Add "images" to the rotation of search box placeholder strings"
This is a reland of commit 2f446e1031
Original change's description:
> Add "images" to the rotation of search box placeholder strings
>
> Bug: 1352636
> Change-Id: I0f6c735b637ecb553aa8eeacaedf2d043277ae1f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4538046
> Commit-Queue: Wen-Chien Wang <wcwang@chromium.org>
> Reviewed-by: Yulun Wu <yulunwu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1145484}
Bug: 1352636
Change-Id: I9e042cf99922e5775c6c0add498b0199fc7b822d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4550159
Commit-Queue: Wen-Chien Wang <wcwang@chromium.org>
Reviewed-by: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1148037}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
98a8edbb2f
commit
8d62336fc6
@ -94,10 +94,11 @@ constexpr auto kTextFieldMarginsForAppListBubble =
|
||||
|
||||
// The default PlaceholderTextTypes used for productivity launcher. Randomly
|
||||
// selected when placeholder text would be shown.
|
||||
constexpr SearchBoxView::PlaceholderTextType kDefaultPlaceholders[3] = {
|
||||
constexpr SearchBoxView::PlaceholderTextType kDefaultPlaceholders[] = {
|
||||
SearchBoxView::PlaceholderTextType::kShortcuts,
|
||||
SearchBoxView::PlaceholderTextType::kTabs,
|
||||
SearchBoxView::PlaceholderTextType::kSettings,
|
||||
SearchBoxView::PlaceholderTextType::kImages,
|
||||
};
|
||||
|
||||
// PlaceholderTextTypes used for productivity launcher for cloud gaming devices.
|
||||
@ -937,6 +938,15 @@ void SearchBoxView::UpdatePlaceholderTextAndAccessibleName() {
|
||||
a11y_name_template, l10n_util::GetStringUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_GAMES)));
|
||||
break;
|
||||
case PlaceholderTextType::kImages:
|
||||
search_box()->SetPlaceholderText(l10n_util::GetStringFUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_TEMPLATE,
|
||||
l10n_util::GetStringUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_IMAGES)));
|
||||
search_box()->SetAccessibleName(l10n_util::GetStringFUTF16(
|
||||
a11y_name_template, l10n_util::GetStringUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_IMAGES)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,8 @@ class ASH_EXPORT SearchBoxView : public SearchBoxViewBase,
|
||||
kShortcuts = 0,
|
||||
kTabs = 1,
|
||||
kSettings = 2,
|
||||
kGames = 3
|
||||
kGames = 3,
|
||||
kImages = 4
|
||||
};
|
||||
|
||||
SearchBoxView(SearchBoxViewDelegate* delegate,
|
||||
|
@ -73,7 +73,11 @@ bool IsValidSearchBoxAccessibilityHint(const std::u16string& hint) {
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_SETTINGS)),
|
||||
l10n_util::GetStringFUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_TEMPLATE_ACCESSIBILITY_NAME_CLAMSHELL,
|
||||
l10n_util::GetStringUTF16(IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_TABS))};
|
||||
l10n_util::GetStringUTF16(IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_TABS)),
|
||||
l10n_util::GetStringFUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_TEMPLATE_ACCESSIBILITY_NAME_CLAMSHELL,
|
||||
l10n_util::GetStringUTF16(
|
||||
IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_IMAGES))};
|
||||
// Check if the current accessibility text is one of the possible
|
||||
// options.
|
||||
return base::Contains(possible_a11y_text, hint);
|
||||
|
@ -6393,6 +6393,9 @@ New install
|
||||
<message name="IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_GAMES" desc="One of possible rotating providers listed in the placeholder text for the search box shown within the ChromeOS launcher. The provider is injected into string 'Search your $1, files, apps, and more...'">
|
||||
games
|
||||
</message>
|
||||
<message name="IDS_APP_LIST_SEARCH_BOX_PLACEHOLDER_IMAGES" desc="One of possible rotating providers listed in the placeholder text for the search box shown within the ChromeOS launcher. The provider is injected into string 'Search your $1, files, apps, and more...'">
|
||||
images
|
||||
</message>
|
||||
|
||||
<!-- WM -->
|
||||
<message name="IDS_ENTER_PIP_A11Y_NOTIFICATION" is_accessibility_with_no_ui="true" desc="Accessibility text read by chromevox when a window starts picture-in-picture mode.">
|
||||
|
@ -0,0 +1 @@
|
||||
c9674d58ab8ccd8a35bf461645590d2ea317da9e
|
Reference in New Issue
Block a user