| 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 "content/browser/speech/google_streaming_remote_engine.h" | 5 #include "content/browser/speech/google_streaming_remote_engine.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/big_endian.h" | 10 #include "base/big_endian.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 if (ws_event.has_status()) { | 439 if (ws_event.has_status()) { |
| 440 switch (ws_event.status()) { | 440 switch (ws_event.status()) { |
| 441 case proto::SpeechRecognitionEvent::STATUS_SUCCESS: | 441 case proto::SpeechRecognitionEvent::STATUS_SUCCESS: |
| 442 break; | 442 break; |
| 443 case proto::SpeechRecognitionEvent::STATUS_NO_SPEECH: | 443 case proto::SpeechRecognitionEvent::STATUS_NO_SPEECH: |
| 444 return Abort(SPEECH_RECOGNITION_ERROR_NO_SPEECH); | 444 return Abort(SPEECH_RECOGNITION_ERROR_NO_SPEECH); |
| 445 case proto::SpeechRecognitionEvent::STATUS_ABORTED: | 445 case proto::SpeechRecognitionEvent::STATUS_ABORTED: |
| 446 return Abort(SPEECH_RECOGNITION_ERROR_ABORTED); | 446 return Abort(SPEECH_RECOGNITION_ERROR_ABORTED); |
| 447 case proto::SpeechRecognitionEvent::STATUS_AUDIO_CAPTURE: | 447 case proto::SpeechRecognitionEvent::STATUS_AUDIO_CAPTURE: |
| 448 return Abort(SPEECH_RECOGNITION_ERROR_AUDIO); | 448 return Abort(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE); |
| 449 case proto::SpeechRecognitionEvent::STATUS_NETWORK: | 449 case proto::SpeechRecognitionEvent::STATUS_NETWORK: |
| 450 return Abort(SPEECH_RECOGNITION_ERROR_NETWORK); | 450 return Abort(SPEECH_RECOGNITION_ERROR_NETWORK); |
| 451 case proto::SpeechRecognitionEvent::STATUS_NOT_ALLOWED: | 451 case proto::SpeechRecognitionEvent::STATUS_NOT_ALLOWED: |
| 452 return Abort(SPEECH_RECOGNITION_ERROR_NOT_ALLOWED); | 452 return Abort(SPEECH_RECOGNITION_ERROR_NOT_ALLOWED); |
| 453 case proto::SpeechRecognitionEvent::STATUS_SERVICE_NOT_ALLOWED: | 453 case proto::SpeechRecognitionEvent::STATUS_SERVICE_NOT_ALLOWED: |
| 454 return Abort(SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED); | 454 return Abort(SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED); |
| 455 case proto::SpeechRecognitionEvent::STATUS_BAD_GRAMMAR: | 455 case proto::SpeechRecognitionEvent::STATUS_BAD_GRAMMAR: |
| 456 return Abort(SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR); | 456 return Abort(SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR); |
| 457 case proto::SpeechRecognitionEvent::STATUS_LANGUAGE_NOT_SUPPORTED: | 457 case proto::SpeechRecognitionEvent::STATUS_LANGUAGE_NOT_SUPPORTED: |
| 458 return Abort(SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED); | 458 return Abort(SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 } | 628 } |
| 629 | 629 |
| 630 GoogleStreamingRemoteEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) | 630 GoogleStreamingRemoteEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) |
| 631 : event(event_value) { | 631 : event(event_value) { |
| 632 } | 632 } |
| 633 | 633 |
| 634 GoogleStreamingRemoteEngine::FSMEventArgs::~FSMEventArgs() { | 634 GoogleStreamingRemoteEngine::FSMEventArgs::~FSMEventArgs() { |
| 635 } | 635 } |
| 636 | 636 |
| 637 } // namespace content | 637 } // namespace content |
| OLD | NEW |