OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/app_list/search/search_resource_manager.h" | 5 #include "chrome/browser/ui/app_list/search/search_resource_manager.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "chrome/browser/ui/app_list/start_page_service.h" | 8 #include "chrome/browser/ui/app_list/start_page_service.h" |
9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
10 #include "chrome/grit/theme_resources.h" | 10 #include "chrome/grit/theme_resources.h" |
11 #include "components/grit/components_scaled_resources.h" | |
12 #include "ui/app_list/search_box_model.h" | 11 #include "ui/app_list/search_box_model.h" |
13 #include "ui/app_list/speech_ui_model.h" | 12 #include "ui/app_list/speech_ui_model.h" |
14 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
16 | 15 |
17 namespace app_list { | 16 namespace app_list { |
18 | 17 |
19 namespace { | 18 namespace { |
20 | 19 |
21 std::unique_ptr<SearchBoxModel::SpeechButtonProperty> CreateNewProperty( | 20 std::unique_ptr<SearchBoxModel::SpeechButtonProperty> CreateNewProperty( |
(...skipping 30 matching lines...) Expand all Loading... |
52 | 51 |
53 void SearchResourceManager::OnSpeechRecognitionStateChanged( | 52 void SearchResourceManager::OnSpeechRecognitionStateChanged( |
54 SpeechRecognitionState new_state) { | 53 SpeechRecognitionState new_state) { |
55 search_box_->SetHintText(l10n_util::GetStringUTF16( | 54 search_box_->SetHintText(l10n_util::GetStringUTF16( |
56 (new_state == SPEECH_RECOGNITION_HOTWORD_LISTENING) ? | 55 (new_state == SPEECH_RECOGNITION_HOTWORD_LISTENING) ? |
57 IDS_SEARCH_BOX_HOTWORD_HINT : IDS_SEARCH_BOX_HINT)); | 56 IDS_SEARCH_BOX_HOTWORD_HINT : IDS_SEARCH_BOX_HINT)); |
58 search_box_->SetSpeechRecognitionButton(CreateNewProperty(new_state)); | 57 search_box_->SetSpeechRecognitionButton(CreateNewProperty(new_state)); |
59 } | 58 } |
60 | 59 |
61 } // namespace app_list | 60 } // namespace app_list |
OLD | NEW |