| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import "ios/chrome/browser/providers/chromium_voice_search_provider.h" | 5 #import "ios/chrome/browser/providers/chromium_voice_search_provider.h" |
| 6 | 6 |
| 7 #import "ios/public/provider/chrome/browser/voice/voice_search_language.h" |
| 8 |
| 7 #if !defined(__has_feature) || !__has_feature(objc_arc) | 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 8 #error "This file requires ARC support." | 10 #error "This file requires ARC support." |
| 9 #endif | 11 #endif |
| 10 | 12 |
| 11 ChromiumVoiceSearchProvider::ChromiumVoiceSearchProvider() {} | 13 ChromiumVoiceSearchProvider::ChromiumVoiceSearchProvider() {} |
| 12 | 14 |
| 13 ChromiumVoiceSearchProvider::~ChromiumVoiceSearchProvider() {} | 15 ChromiumVoiceSearchProvider::~ChromiumVoiceSearchProvider() {} |
| 14 | 16 |
| 15 bool ChromiumVoiceSearchProvider::IsVoiceSearchEnabled() const { | 17 bool ChromiumVoiceSearchProvider::IsVoiceSearchEnabled() const { |
| 16 return false; | 18 return false; |
| 17 } | 19 } |
| 20 |
| 21 NSArray* ChromiumVoiceSearchProvider::GetAvailableLanguages() const { |
| 22 // Add two arbitrary languages to the list, so that options show up in the |
| 23 // voice search settings page. |
| 24 VoiceSearchLanguage* en_US = |
| 25 [[VoiceSearchLanguage alloc] initWithIdentifier:@"en-US" |
| 26 displayName:@"English (US)" |
| 27 localizationPreference:nil]; |
| 28 VoiceSearchLanguage* fr = |
| 29 [[VoiceSearchLanguage alloc] initWithIdentifier:@"fr" |
| 30 displayName:@"French" |
| 31 localizationPreference:nil]; |
| 32 |
| 33 return @[ en_US, fr ]; |
| 34 } |
| OLD | NEW |