| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|