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

Side by Side Diff: ios/web_view/internal/translate/cwv_language_detection_result.mm

Issue 2839093002: Implemented new Translate API for purely Objective-C clients. (Closed)
Patch Set: added TODO Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/web_view/public/cwv_language_detection_result.h"
6
7 #import "ios/web_view/internal/translate/cwv_language_detection_result_internal. h"
8 #import "ios/web_view/public/cwv_translation_language.h"
9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
14 @implementation CWVLanguageDetectionResult
15
16 @synthesize pageLanguage = _pageLanguage;
17 @synthesize OSLanguage = _OSLanguage;
18 @synthesize supportedLanguages = _supportedLanguages;
19
20 - (instancetype)initWithPageLanguage:(CWVTranslationLanguage*)pageLanguage
21 OSLanguage:(CWVTranslationLanguage*)OSLanguage
22 supportedLanguages:
23 (NSArray<CWVTranslationLanguage*>*)supportedLanguages {
24 self = [super init];
25 if (self) {
26 _pageLanguage = pageLanguage;
27 _OSLanguage = OSLanguage;
28 _supportedLanguages = supportedLanguages;
Eugene But (OOO till 7-30) 2017/04/27 13:08:08 [supportedLanguages copy] ?
jzw1 2017/04/28 02:34:54 it was copied on its way in, do you prefer to have
Eugene But (OOO till 7-30) 2017/04/28 03:07:28 I don't think this code should make assumptions ab
Eugene But (OOO till 7-30) 2017/04/28 07:18:07 Please look at this comment
29 }
30 return self;
31 }
32
33 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698