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

Unified Diff: ios/chrome/browser/voice/speech_input_locale_match_config.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/chrome/browser/voice/speech_input_locale_match_config.h
diff --git a/ios/chrome/browser/voice/speech_input_locale_match_config.h b/ios/chrome/browser/voice/speech_input_locale_match_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..011f7cab21d6f6314c02d842eecd7b7d638f690d
--- /dev/null
+++ b/ios/chrome/browser/voice/speech_input_locale_match_config.h
@@ -0,0 +1,44 @@
+// 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_CHROME_BROWSER_VOICE_SPEECH_INPUT_LOCALE_MATCH_CONFIG_H_
+#define IOS_CHROME_BROWSER_VOICE_SPEECH_INPUT_LOCALE_MATCH_CONFIG_H_
+
+#import <Foundation/Foundation.h>
+
+#import "ios/chrome/browser/updatable_config/updatable_array.h"
+
+// Object containing matching locales for unsupported regional variants, loaded
+// from SpeechInputLocaleMatches.plist.
+@interface SpeechInputLocaleMatchConfig : UpdatableArray
+
+// Access to singleton object.
++ (instancetype)sharedInstance;
+
+// The SpeechInputLocaleMatches loaded from the plist.
+@property(nonatomic, readonly) NSArray* matches;
+
+@end
+
+// Object describing the locale codes that match a single supported locale.
+@interface SpeechInputLocaleMatch : NSObject
+
+// Designated initializer.
+- (instancetype)initWithDictionary:(NSDictionary*)matchDict
+ NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
+
+// The locale code that should be used as the default code for the locale codes
+// found in |matchingLocaleCodes|.
+@property(nonatomic, readonly) NSString* matchedLocaleCode;
+
+// The locale codes that should be matched with |matchedLocaleCode|.
+@property(nonatomic, readonly) NSArray* matchingLocaleCodes;
+
+// The languages that use |matchedLocaleCode| as a default.
+@property(nonatomic, readonly) NSArray* matchingLanguages;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_VOICE_SPEECH_INPUT_LOCALE_MATCH_CONFIG_H_

Powered by Google App Engine
This is Rietveld 408576698