| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } // namespace | 87 } // namespace |
| 88 | 88 |
| 89 const int GoogleStreamingRemoteEngine::kUpstreamUrlFetcherIdForTests = 0; | 89 const int GoogleStreamingRemoteEngine::kUpstreamUrlFetcherIdForTests = 0; |
| 90 const int GoogleStreamingRemoteEngine::kDownstreamUrlFetcherIdForTests = 1; | 90 const int GoogleStreamingRemoteEngine::kDownstreamUrlFetcherIdForTests = 1; |
| 91 const int GoogleStreamingRemoteEngine::kWebserviceStatusNoError = 0; | 91 const int GoogleStreamingRemoteEngine::kWebserviceStatusNoError = 0; |
| 92 const int GoogleStreamingRemoteEngine::kWebserviceStatusErrorNoMatch = 5; | 92 const int GoogleStreamingRemoteEngine::kWebserviceStatusErrorNoMatch = 5; |
| 93 | 93 |
| 94 GoogleStreamingRemoteEngine::GoogleStreamingRemoteEngine( | 94 GoogleStreamingRemoteEngine::GoogleStreamingRemoteEngine( |
| 95 net::URLRequestContextGetter* context) | 95 net::URLRequestContextGetter* context) |
| 96 : url_context_(context), | 96 : url_context_(context), |
| 97 encoder_(NULL), | |
| 98 previous_response_length_(0), | 97 previous_response_length_(0), |
| 99 got_last_definitive_result_(false), | 98 got_last_definitive_result_(false), |
| 100 is_dispatching_event_(false), | 99 is_dispatching_event_(false), |
| 101 state_(STATE_IDLE) { | 100 state_(STATE_IDLE) {} |
| 102 } | |
| 103 | 101 |
| 104 GoogleStreamingRemoteEngine::~GoogleStreamingRemoteEngine() {} | 102 GoogleStreamingRemoteEngine::~GoogleStreamingRemoteEngine() {} |
| 105 | 103 |
| 106 void GoogleStreamingRemoteEngine::SetConfig( | 104 void GoogleStreamingRemoteEngine::SetConfig( |
| 107 const SpeechRecognitionEngineConfig& config) { | 105 const SpeechRecognitionEngineConfig& config) { |
| 108 config_ = config; | 106 config_ = config; |
| 109 } | 107 } |
| 110 | 108 |
| 111 void GoogleStreamingRemoteEngine::StartRecognition() { | 109 void GoogleStreamingRemoteEngine::StartRecognition() { |
| 112 FSMEventArgs event_args(EVENT_START_RECOGNITION); | 110 FSMEventArgs event_args(EVENT_START_RECOGNITION); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 } | 585 } |
| 588 | 586 |
| 589 GoogleStreamingRemoteEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) | 587 GoogleStreamingRemoteEngine::FSMEventArgs::FSMEventArgs(FSMEvent event_value) |
| 590 : event(event_value) { | 588 : event(event_value) { |
| 591 } | 589 } |
| 592 | 590 |
| 593 GoogleStreamingRemoteEngine::FSMEventArgs::~FSMEventArgs() { | 591 GoogleStreamingRemoteEngine::FSMEventArgs::~FSMEventArgs() { |
| 594 } | 592 } |
| 595 | 593 |
| 596 } // namespace content | 594 } // namespace content |
| OLD | NEW |