Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: content/browser/speech/speech_recognizer_impl.h

Issue 1891543002: Devirtualize SpeechRecognitionEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kill_one_shot_engine
Patch Set: drop an include Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_RECOGNIZER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 namespace content { 25 namespace content {
26 26
27 class SpeechRecognitionEventListener; 27 class SpeechRecognitionEventListener;
28 28
29 // Handles speech recognition for a session (identified by |session_id|), taking 29 // Handles speech recognition for a session (identified by |session_id|), taking
30 // care of audio capture, silence detection/endpointer and interaction with the 30 // care of audio capture, silence detection/endpointer and interaction with the
31 // SpeechRecognitionEngine. 31 // SpeechRecognitionEngine.
32 class CONTENT_EXPORT SpeechRecognizerImpl 32 class CONTENT_EXPORT SpeechRecognizerImpl
33 : public SpeechRecognizer, 33 : public SpeechRecognizer,
34 public media::AudioInputController::EventHandler, 34 public media::AudioInputController::EventHandler,
35 public NON_EXPORTED_BASE(SpeechRecognitionEngineDelegate) { 35 public NON_EXPORTED_BASE(SpeechRecognitionEngine::Delegate) {
36 public: 36 public:
37 static const int kAudioSampleRate; 37 static const int kAudioSampleRate;
38 static const media::ChannelLayout kChannelLayout; 38 static const media::ChannelLayout kChannelLayout;
39 static const int kNumBitsPerAudioSample; 39 static const int kNumBitsPerAudioSample;
40 static const int kNoSpeechTimeoutMs; 40 static const int kNoSpeechTimeoutMs;
41 static const int kEndpointerEstimationTimeMs; 41 static const int kEndpointerEstimationTimeMs;
42 42
43 static void SetAudioManagerForTesting(media::AudioManager* audio_manager); 43 static void SetAudioManagerForTesting(media::AudioManager* audio_manager);
44 44
45 SpeechRecognizerImpl(SpeechRecognitionEventListener* listener, 45 SpeechRecognizerImpl(SpeechRecognitionEventListener* listener,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Converts data between native input format and a WebSpeech specific 166 // Converts data between native input format and a WebSpeech specific
167 // output format. 167 // output format.
168 std::unique_ptr<SpeechRecognizerImpl::OnDataConverter> audio_converter_; 168 std::unique_ptr<SpeechRecognizerImpl::OnDataConverter> audio_converter_;
169 169
170 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImpl); 170 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImpl);
171 }; 171 };
172 172
173 } // namespace content 173 } // namespace content
174 174
175 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_ 175 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698