Chromium Code Reviews| Index: ios/web_view/internal/translate/cwv_language_detection_result.mm |
| diff --git a/ios/web_view/internal/translate/cwv_language_detection_result.mm b/ios/web_view/internal/translate/cwv_language_detection_result.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2ea99738d3efe2459e197ff42ee2169d7aebdfc8 |
| --- /dev/null |
| +++ b/ios/web_view/internal/translate/cwv_language_detection_result.mm |
| @@ -0,0 +1,33 @@ |
| +// 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. |
| + |
| +#import "ios/web_view/public/cwv_language_detection_result.h" |
|
michaeldo
2017/05/01 18:25:36
No need for this import. _internal.h import is OK,
jzw1
2017/05/08 03:36:27
Ah ok. Was wondering about that :)
|
| + |
| +#import "ios/web_view/internal/translate/cwv_language_detection_result_internal.h" |
| +#import "ios/web_view/public/cwv_translation_language.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +@implementation CWVLanguageDetectionResult |
| + |
| +@synthesize pageLanguage = _pageLanguage; |
| +@synthesize suggestedTargetLanguage = _suggestedTargetLanguage; |
| +@synthesize supportedLanguages = _supportedLanguages; |
| + |
| +- (instancetype) |
| + initWithPageLanguage:(CWVTranslationLanguage*)pageLanguage |
| +suggestedTargetLanguage:(CWVTranslationLanguage*)suggestedTargetLanguage |
| + supportedLanguages:(NSArray<CWVTranslationLanguage*>*)supportedLanguages { |
| + self = [super init]; |
| + if (self) { |
| + _pageLanguage = pageLanguage; |
| + _suggestedTargetLanguage = suggestedTargetLanguage; |
| + _supportedLanguages = supportedLanguages; |
| + } |
| + return self; |
| +} |
| + |
| +@end |