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 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ |
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void EndRecognition(); | 112 void EndRecognition(); |
113 void TakeAudioChunk(const AudioChunk& data); | 113 void TakeAudioChunk(const AudioChunk& data); |
114 void AudioChunksEnded(); | 114 void AudioChunksEnded(); |
115 bool IsRecognitionPending() const; | 115 bool IsRecognitionPending() const; |
116 int GetDesiredAudioChunkDurationMs() const; | 116 int GetDesiredAudioChunkDurationMs() const; |
117 | 117 |
118 // net::URLFetcherDelegate methods. | 118 // net::URLFetcherDelegate methods. |
119 void OnURLFetchComplete(const net::URLFetcher* source) override; | 119 void OnURLFetchComplete(const net::URLFetcher* source) override; |
120 void OnURLFetchDownloadProgress(const net::URLFetcher* source, | 120 void OnURLFetchDownloadProgress(const net::URLFetcher* source, |
121 int64_t current, | 121 int64_t current, |
122 int64_t total) override; | 122 int64_t total, |
| 123 int64_t current_network_bytes) override; |
123 | 124 |
124 private: | 125 private: |
125 Delegate* delegate_; | 126 Delegate* delegate_; |
126 | 127 |
127 // Response status codes from the speech recognition webservice. | 128 // Response status codes from the speech recognition webservice. |
128 static const int kWebserviceStatusNoError; | 129 static const int kWebserviceStatusNoError; |
129 static const int kWebserviceStatusErrorNoMatch; | 130 static const int kWebserviceStatusErrorNoMatch; |
130 | 131 |
131 // Frame type for framed POST data. Do NOT change these. They must match | 132 // Frame type for framed POST data. Do NOT change these. They must match |
132 // values the server expects. | 133 // values the server expects. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 bool is_dispatching_event_; | 216 bool is_dispatching_event_; |
216 bool use_framed_post_data_; | 217 bool use_framed_post_data_; |
217 FSMState state_; | 218 FSMState state_; |
218 | 219 |
219 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionEngine); | 220 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionEngine); |
220 }; | 221 }; |
221 | 222 |
222 } // namespace content | 223 } // namespace content |
223 | 224 |
224 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ | 225 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_ |
OLD | NEW |