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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java

Issue 1075443004: Rename from ERROR_AUDIO to ERROR_AUDIO_CAPTURE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.pm.PackageManager; 10 import android.content.pm.PackageManager;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 } 89 }
90 90
91 @Override 91 @Override
92 public void onError(int error) { 92 public void onError(int error) {
93 int code = SpeechRecognitionErrorCode.NONE; 93 int code = SpeechRecognitionErrorCode.NONE;
94 94
95 // Translate Android SpeechRecognizer errors to Web Speech API error s. 95 // Translate Android SpeechRecognizer errors to Web Speech API error s.
96 switch(error) { 96 switch(error) {
97 case SpeechRecognizer.ERROR_AUDIO: 97 case SpeechRecognizer.ERROR_AUDIO:
98 code = SpeechRecognitionErrorCode.AUDIO; 98 code = SpeechRecognitionErrorCode.AUDIO_CAPTURE;
99 break; 99 break;
100 case SpeechRecognizer.ERROR_CLIENT: 100 case SpeechRecognizer.ERROR_CLIENT:
101 code = SpeechRecognitionErrorCode.ABORTED; 101 code = SpeechRecognitionErrorCode.ABORTED;
102 break; 102 break;
103 case SpeechRecognizer.ERROR_RECOGNIZER_BUSY: 103 case SpeechRecognizer.ERROR_RECOGNIZER_BUSY:
104 case SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS: 104 case SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS:
105 code = SpeechRecognitionErrorCode.NOT_ALLOWED; 105 code = SpeechRecognitionErrorCode.NOT_ALLOWED;
106 break; 106 break;
107 case SpeechRecognizer.ERROR_NETWORK_TIMEOUT: 107 case SpeechRecognizer.ERROR_NETWORK_TIMEOUT:
108 case SpeechRecognizer.ERROR_NETWORK: 108 case SpeechRecognizer.ERROR_NETWORK:
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 private native void nativeOnSoundStart(long nativeSpeechRecognizerImplAndroi d); 277 private native void nativeOnSoundStart(long nativeSpeechRecognizerImplAndroi d);
278 private native void nativeOnSoundEnd(long nativeSpeechRecognizerImplAndroid) ; 278 private native void nativeOnSoundEnd(long nativeSpeechRecognizerImplAndroid) ;
279 private native void nativeOnAudioEnd(long nativeSpeechRecognizerImplAndroid) ; 279 private native void nativeOnAudioEnd(long nativeSpeechRecognizerImplAndroid) ;
280 private native void nativeOnRecognitionResults(long nativeSpeechRecognizerIm plAndroid, 280 private native void nativeOnRecognitionResults(long nativeSpeechRecognizerIm plAndroid,
281 String[] results, 281 String[] results,
282 float[] scores, 282 float[] scores,
283 boolean provisional); 283 boolean provisional);
284 private native void nativeOnRecognitionError(long nativeSpeechRecognizerImpl Android, int error); 284 private native void nativeOnRecognitionError(long nativeSpeechRecognizerImpl Android, int error);
285 private native void nativeOnRecognitionEnd(long nativeSpeechRecognizerImplAn droid); 285 private native void nativeOnRecognitionEnd(long nativeSpeechRecognizerImplAn droid);
286 } 286 }
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognizer_impl_unittest.cc ('k') | content/public/common/speech_recognition_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698