Chromium Code Reviews| Index: ios/web_view/public/cwv_language_detection_result.h |
| diff --git a/ios/web_view/public/cwv_language_detection_result.h b/ios/web_view/public/cwv_language_detection_result.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..29923e3ead38a41054dc2eaa17fbf940cbc151f1 |
| --- /dev/null |
| +++ b/ios/web_view/public/cwv_language_detection_result.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2017 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_WEB_VIEW_PUBLIC_CWV_LANGUAGE_DETECTION_RESULT_H |
| +#define IOS_WEB_VIEW_PUBLIC_CWV_LANGUAGE_DETECTION_RESULT_H |
| + |
| +#import <ChromeWebView/cwv_export.h> |
| +#import <Foundation/Foundation.h> |
| + |
| +NS_ASSUME_NONNULL_BEGIN |
| + |
| +@class CWVTranslationLanguage; |
| + |
| +// Encapsulates the results of language detection in one class. |
| +CWV_EXPORT |
| +@interface CWVLanguageDetectionResult : NSObject |
| + |
| +- (instancetype)init NS_UNAVAILABLE; |
| + |
| +// The detected language of the page. |
| +// Can be used to translate to |suggestedTargetLanguage|. |
|
michaeldo
2017/05/01 18:25:37
No need for second line of comment.
jzw1
2017/05/08 03:36:28
Done.
|
| +@property(nonatomic, readonly) CWVTranslationLanguage* pageLanguage; |
| + |
| +// The suggested language to translate to. |
|
michaeldo
2017/05/01 18:25:37
What about this specifying where this comes from.
jzw1
2017/05/08 03:36:28
I believe Eugene didn't want to be too specific si
michaeldo
2017/05/08 15:15:48
Ok, no prob. That's a good point.
|
| +// Can be used to translate from |detectedPageLanguage|. |
|
michaeldo
2017/05/01 18:25:37
No need for second line of comment.
jzw1
2017/05/08 03:36:28
Done.
|
| +@property(nonatomic, readonly) CWVTranslationLanguage* suggestedTargetLanguage; |
| + |
| +// The list of supported languages that can be used in translation. |
| +@property(nonatomic, readonly) |
|
michaeldo
2017/05/01 18:25:37
copy attribute here?
jzw1
2017/05/08 03:36:28
Done.
|
| + NSArray<CWVTranslationLanguage*>* supportedLanguages; |
| + |
| +@end |
| + |
| +NS_ASSUME_NONNULL_END |
| + |
| +#endif // IOS_WEB_VIEW_PUBLIC_CWV_LANGUAGE_DETECTION_RESULT_H |