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

Side by Side Diff: chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc

Issue 16286010: Removed the IsRecordingInProcess check for speech since it is not needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unused error code and relevant resource, cleaned up include Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/speech/chrome_speech_recognition_manager_delegate.h" 5 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 return; 410 return;
411 DCHECK(RequiresBubble(session_id)); 411 DCHECK(RequiresBubble(session_id));
412 412
413 int error_message_id = 0; 413 int error_message_id = 0;
414 switch (error.code) { 414 switch (error.code) {
415 case content::SPEECH_RECOGNITION_ERROR_AUDIO: 415 case content::SPEECH_RECOGNITION_ERROR_AUDIO:
416 switch (error.details) { 416 switch (error.details) {
417 case content::SPEECH_AUDIO_ERROR_DETAILS_NO_MIC: 417 case content::SPEECH_AUDIO_ERROR_DETAILS_NO_MIC:
418 error_message_id = IDS_SPEECH_INPUT_NO_MIC; 418 error_message_id = IDS_SPEECH_INPUT_NO_MIC;
419 break; 419 break;
420 case content::SPEECH_AUDIO_ERROR_DETAILS_IN_USE:
421 error_message_id = IDS_SPEECH_INPUT_MIC_IN_USE;
422 break;
423 default: 420 default:
424 error_message_id = IDS_SPEECH_INPUT_MIC_ERROR; 421 error_message_id = IDS_SPEECH_INPUT_MIC_ERROR;
425 break; 422 break;
426 } 423 }
427 break; 424 break;
428 case content::SPEECH_RECOGNITION_ERROR_ABORTED: 425 case content::SPEECH_RECOGNITION_ERROR_ABORTED:
429 error_message_id = IDS_SPEECH_INPUT_ABORTED; 426 error_message_id = IDS_SPEECH_INPUT_ABORTED;
430 break; 427 break;
431 case content::SPEECH_RECOGNITION_ERROR_NO_SPEECH: 428 case content::SPEECH_RECOGNITION_ERROR_NO_SPEECH:
432 error_message_id = IDS_SPEECH_INPUT_NO_SPEECH; 429 error_message_id = IDS_SPEECH_INPUT_NO_SPEECH;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 561 }
565 562
566 SpeechRecognitionBubbleController* 563 SpeechRecognitionBubbleController*
567 ChromeSpeechRecognitionManagerDelegate::GetBubbleController() { 564 ChromeSpeechRecognitionManagerDelegate::GetBubbleController() {
568 if (!bubble_controller_.get()) 565 if (!bubble_controller_.get())
569 bubble_controller_ = new SpeechRecognitionBubbleController(this); 566 bubble_controller_ = new SpeechRecognitionBubbleController(this);
570 return bubble_controller_.get(); 567 return bubble_controller_.get();
571 } 568 }
572 569
573 } // namespace speech 570 } // namespace speech
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/browser/speech/speech_recognition_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698