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

Unified Diff: ios/public/provider/chrome/browser/voice/voice_search_language.h

Issue 2425713002: [ios] Adds configuration helper files for voice search. (Closed)
Patch Set: Review and file moves. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ios/public/provider/chrome/browser/voice/voice_search_language.h
diff --git a/ios/public/provider/chrome/browser/voice/voice_search_language.h b/ios/public/provider/chrome/browser/voice/voice_search_language.h
new file mode 100644
index 0000000000000000000000000000000000000000..afb44f411d64b535b258043e0abc6ad54e3f8ef5
--- /dev/null
+++ b/ios/public/provider/chrome/browser/voice/voice_search_language.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_LANGUAGE_H_
+#define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_LANGUAGE_H_
+
+#import <Foundation/Foundation.h>
+
+// VoiceSearchLanguage stores data about a single supported voice search
+// language.
+@interface VoiceSearchLanguage : NSObject
+
+// Creates a VoiceSearchLanguageObject. |localizationPreferences| can be nil.
+- (instancetype)initWithIdentifier:(NSString*)identifier
+ displayName:(NSString*)displayName
+ localizationPreference:(NSString*)localizationPreference
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// The BCP 47 identifier for the language, e.g. "en-us" or "yue-hant-hk".
+@property(nonatomic, readonly, copy) NSString* identifier;
+
+// The display name for the language.
+@property(nonatomic, readonly, copy) NSString* displayName;
+
+// A localization identifier for use with +[NSBundle
+// preferredLocalizationsFromArray:forPreferences:]. In general this is the
+// same as |identifier|, but in some cases e.g. Chinese and Cantonese it
+// differs to facilitate the NSBundle method.
+@property(nonatomic, readonly, copy) NSString* localizationPreference;
+
+@end
+
+#endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_LANGUAGE_H_

Powered by Google App Engine
This is Rietveld 408576698