Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_translation_language.h" | |
| 6 | |
| 7 #include "base/strings/string16.h" | |
| 8 #include "base/strings/sys_string_conversions.h" | |
| 9 #import "ios/web_view/internal/translate/cwv_translation_language_internal.h" | |
|
michaeldo
2017/05/01 18:25:37
We can replace the import of cwv_translation_langu
jzw1
2017/05/08 03:36:28
Done.
| |
| 10 | |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 12 #error "This file requires ARC support." | |
| 13 #endif | |
| 14 | |
| 15 @implementation CWVTranslationLanguage | |
| 16 | |
| 17 @synthesize languageCode = _languageCode; | |
| 18 @synthesize languageName = _languageName; | |
| 19 | |
| 20 - (instancetype)initWithLanguageCode:(const std::string&)languageCode | |
| 21 languageName:(const base::string16&)languageName { | |
| 22 self = [super init]; | |
| 23 if (self) { | |
| 24 _languageCode = base::SysUTF8ToNSString(languageCode); | |
| 25 _languageName = base::SysUTF16ToNSString(languageName); | |
| 26 } | |
| 27 return self; | |
| 28 } | |
| 29 | |
| 30 @end | |
| OLD | NEW |