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

Side by Side Diff: ui/app_list/views/speech_view.cc

Issue 149753002: Enables the 'hotword not listening' icon in the search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix breaks Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/views/speech_view.h" 5 #include "ui/app_list/views/speech_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 void SpeechView::OnSpeechResult(const base::string16& result, 203 void SpeechView::OnSpeechResult(const base::string16& result,
204 bool is_final) { 204 bool is_final) {
205 speech_result_->SetText(result); 205 speech_result_->SetText(result);
206 speech_result_->SetEnabledColor(kResultTextColor); 206 speech_result_->SetEnabledColor(kResultTextColor);
207 } 207 }
208 208
209 void SpeechView::OnSpeechRecognitionStateChanged( 209 void SpeechView::OnSpeechRecognitionStateChanged(
210 SpeechRecognitionState new_state) { 210 SpeechRecognitionState new_state) {
211 int resource_id = IDR_APP_LIST_SPEECH_MIC_OFF; 211 int resource_id = IDR_APP_LIST_SPEECH_MIC_OFF;
212 if (new_state == SPEECH_RECOGNITION_ON) 212 if (new_state == SPEECH_RECOGNITION_RECOGNIZING)
213 resource_id = IDR_APP_LIST_SPEECH_MIC_ON; 213 resource_id = IDR_APP_LIST_SPEECH_MIC_ON;
214 else if (new_state == SPEECH_RECOGNITION_IN_SPEECH) 214 else if (new_state == SPEECH_RECOGNITION_IN_SPEECH)
215 resource_id = IDR_APP_LIST_SPEECH_MIC_RECORDING; 215 resource_id = IDR_APP_LIST_SPEECH_MIC_RECORDING;
216 216
217 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 217 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
218 mic_button_->SetImage(views::Button::STATE_NORMAL, bundle.GetImageSkiaNamed( 218 mic_button_->SetImage(views::Button::STATE_NORMAL, bundle.GetImageSkiaNamed(
219 resource_id)); 219 resource_id));
220 } 220 }
221 221
222 } // namespace app_list 222 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698