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

Unified Diff: ios/chrome/browser/providers/chromium_voice_search_provider.mm

Issue 2526043002: [ios] Implements even more of ChromiumBrowserProvider. (Closed)
Patch Set: fr Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/providers/chromium_voice_search_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/providers/chromium_voice_search_provider.mm
diff --git a/ios/chrome/browser/providers/chromium_voice_search_provider.mm b/ios/chrome/browser/providers/chromium_voice_search_provider.mm
index d35449b3645db3ae611c05249a6b5dbf36487a62..dbf64f9e8f725f79ae405363c1bf4dd3bab4b90d 100644
--- a/ios/chrome/browser/providers/chromium_voice_search_provider.mm
+++ b/ios/chrome/browser/providers/chromium_voice_search_provider.mm
@@ -4,6 +4,8 @@
#import "ios/chrome/browser/providers/chromium_voice_search_provider.h"
+#import "ios/public/provider/chrome/browser/voice/voice_search_language.h"
+
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@@ -15,3 +17,18 @@ ChromiumVoiceSearchProvider::~ChromiumVoiceSearchProvider() {}
bool ChromiumVoiceSearchProvider::IsVoiceSearchEnabled() const {
return false;
}
+
+NSArray* ChromiumVoiceSearchProvider::GetAvailableLanguages() const {
+ // Add two arbitrary languages to the list, so that options show up in the
+ // voice search settings page.
+ VoiceSearchLanguage* en_US =
+ [[VoiceSearchLanguage alloc] initWithIdentifier:@"en-US"
+ displayName:@"English (US)"
+ localizationPreference:nil];
+ VoiceSearchLanguage* fr =
+ [[VoiceSearchLanguage alloc] initWithIdentifier:@"fr"
+ displayName:@"French"
+ localizationPreference:nil];
+
+ return @[ en_US, fr ];
+}
« no previous file with comments | « ios/chrome/browser/providers/chromium_voice_search_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698