Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3535)

Unified Diff: chrome/browser/ui/app_list/search/search_resource_manager.cc

Issue 2934883002: cros: add new search box hint text for launcher (Closed)
Patch Set: ash::GetChromeOSDeviceName Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/search_resource_manager.cc
diff --git a/chrome/browser/ui/app_list/search/search_resource_manager.cc b/chrome/browser/ui/app_list/search/search_resource_manager.cc
index fcf3fa499219a1f60043ff5b2e689cdba27c5b5c..62085af73f0f8d013e971e74747ee9b196bdadd2 100644
--- a/chrome/browser/ui/app_list/search/search_resource_manager.cc
+++ b/chrome/browser/ui/app_list/search/search_resource_manager.cc
@@ -4,10 +4,12 @@
#include "chrome/browser/ui/app_list/search/search_resource_manager.h"
+#include "ash/system/devicetype_utils.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/ui/app_list/start_page_service.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
+#include "ui/app_list/app_list_features.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/speech_ui_model.h"
#include "ui/base/l10n/l10n_util.h"
@@ -40,8 +42,13 @@ SearchResourceManager::SearchResourceManager(Profile* profile,
speech_ui_(speech_ui) {
speech_ui_->AddObserver(this);
- search_box_->SetAccessibleName(
- l10n_util::GetStringUTF16(IDS_SEARCH_BOX_HINT));
+ if (features::IsFullscreenAppListEnabled()) {
+ search_box_->SetAccessibleName(l10n_util::GetStringFUTF16(
+ IDS_SEARCH_BOX_HINT_FULLSCREEN, ash::GetChromeOSDeviceName()));
+ } else {
+ search_box_->SetAccessibleName(
+ l10n_util::GetStringUTF16(IDS_SEARCH_BOX_HINT));
+ }
OnSpeechRecognitionStateChanged(speech_ui_->state());
}
@@ -51,9 +58,15 @@ SearchResourceManager::~SearchResourceManager() {
void SearchResourceManager::OnSpeechRecognitionStateChanged(
SpeechRecognitionState new_state) {
- search_box_->SetHintText(l10n_util::GetStringUTF16(
- (new_state == SPEECH_RECOGNITION_HOTWORD_LISTENING) ?
- IDS_SEARCH_BOX_HOTWORD_HINT : IDS_SEARCH_BOX_HINT));
+ if (features::IsFullscreenAppListEnabled()) {
+ search_box_->SetHintText(l10n_util::GetStringFUTF16(
+ IDS_SEARCH_BOX_HINT_FULLSCREEN, ash::GetChromeOSDeviceName()));
+ } else {
+ search_box_->SetHintText(l10n_util::GetStringUTF16(
+ (new_state == SPEECH_RECOGNITION_HOTWORD_LISTENING)
+ ? IDS_SEARCH_BOX_HOTWORD_HINT
+ : IDS_SEARCH_BOX_HINT));
+ }
search_box_->SetSpeechRecognitionButton(CreateNewProperty(new_state));
}
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698