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

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

Issue 1354363002: Cleanup: Pass std::string as const reference from content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_ANDROID_H_
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_ANDROID_H_ 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 static bool RegisterSpeechRecognizer(JNIEnv* env); 43 static bool RegisterSpeechRecognizer(JNIEnv* env);
44 44
45 private: 45 private:
46 enum State { 46 enum State {
47 STATE_IDLE = 0, 47 STATE_IDLE = 0,
48 STATE_CAPTURING_AUDIO, 48 STATE_CAPTURING_AUDIO,
49 STATE_AWAITING_FINAL_RESULT 49 STATE_AWAITING_FINAL_RESULT
50 }; 50 };
51 51
52 void StartRecognitionOnUIThread( 52 void StartRecognitionOnUIThread(const std::string& language,
53 std::string language, bool continuous, bool interim_results); 53 bool continuous,
54 bool interim_results);
54 void OnRecognitionResultsOnIOThread(SpeechRecognitionResults const &results); 55 void OnRecognitionResultsOnIOThread(SpeechRecognitionResults const &results);
55 56
56 ~SpeechRecognizerImplAndroid() override; 57 ~SpeechRecognizerImplAndroid() override;
57 58
58 base::android::ScopedJavaGlobalRef<jobject> j_recognition_; 59 base::android::ScopedJavaGlobalRef<jobject> j_recognition_;
59 State state_; 60 State state_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImplAndroid); 62 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImplAndroid);
62 }; 63 };
63 64
64 } // namespace content 65 } // namespace content
65 66
66 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_ANDROID_H_ 67 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_browsertest.cc ('k') | content/browser/speech/speech_recognizer_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698