| 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_one_shot_remote_engine.h" | 5 #include "content/browser/speech/google_one_shot_remote_engine.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 result->hypotheses.clear(); | 141 result->hypotheses.clear(); |
| 142 return false; | 142 return false; |
| 143 } | 143 } |
| 144 return true; | 144 return true; |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace | 147 } // namespace |
| 148 | 148 |
| 149 namespace speech { | 149 namespace speech { |
| 150 | 150 |
| 151 const int GoogleOneShotRemoteEngine::kAudioPacketIntervalMs = 100; | |
| 152 int GoogleOneShotRemoteEngine::url_fetcher_id_for_tests = 0; | 151 int GoogleOneShotRemoteEngine::url_fetcher_id_for_tests = 0; |
| 153 | 152 |
| 154 GoogleOneShotRemoteEngine::GoogleOneShotRemoteEngine( | 153 GoogleOneShotRemoteEngine::GoogleOneShotRemoteEngine( |
| 155 net::URLRequestContextGetter* context) | 154 net::URLRequestContextGetter* context) |
| 156 : url_context_(context) { | 155 : url_context_(context) { |
| 157 } | 156 } |
| 158 | 157 |
| 159 GoogleOneShotRemoteEngine::~GoogleOneShotRemoteEngine() {} | 158 GoogleOneShotRemoteEngine::~GoogleOneShotRemoteEngine() {} |
| 160 | 159 |
| 161 void GoogleOneShotRemoteEngine::SetConfig( | 160 void GoogleOneShotRemoteEngine::SetConfig( |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 281 |
| 283 bool GoogleOneShotRemoteEngine::IsRecognitionPending() const { | 282 bool GoogleOneShotRemoteEngine::IsRecognitionPending() const { |
| 284 return url_fetcher_ != NULL; | 283 return url_fetcher_ != NULL; |
| 285 } | 284 } |
| 286 | 285 |
| 287 int GoogleOneShotRemoteEngine::GetDesiredAudioChunkDurationMs() const { | 286 int GoogleOneShotRemoteEngine::GetDesiredAudioChunkDurationMs() const { |
| 288 return kAudioPacketIntervalMs; | 287 return kAudioPacketIntervalMs; |
| 289 } | 288 } |
| 290 | 289 |
| 291 } // namespace speech | 290 } // namespace speech |
| OLD | NEW |