| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_POLICY_H | 5 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_POLICY_H |
| 6 #define IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_POLICY_H | 6 #define IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_POLICY_H |
| 7 | 7 |
| 8 #import <ChromeWebView/cwv_export.h> | |
| 9 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 10 | 9 |
| 10 #import "cwv_export.h" |
| 11 |
| 11 NS_ASSUME_NONNULL_BEGIN | 12 NS_ASSUME_NONNULL_BEGIN |
| 12 | 13 |
| 13 @class CWVTranslationLanguage; | 14 @class CWVTranslationLanguage; |
| 14 | 15 |
| 15 typedef NS_ENUM(NSInteger, CWVTranslationPolicyType) { | 16 typedef NS_ENUM(NSInteger, CWVTranslationPolicyType) { |
| 16 CWVTranslationPolicyAsk = 1, // Prompt user on whether or not to translate. | 17 CWVTranslationPolicyAsk = 1, // Prompt user on whether or not to translate. |
| 17 CWVTranslationPolicyNever, // Never translate. | 18 CWVTranslationPolicyNever, // Never translate. |
| 18 CWVTranslationPolicyAuto // Automatically translate according to policy. | 19 CWVTranslationPolicyAuto // Automatically translate according to policy. |
| 19 }; | 20 }; |
| 20 | 21 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 38 // It is nil unless |type| is CWVTranslationPolicyAuto. | 39 // It is nil unless |type| is CWVTranslationPolicyAuto. |
| 39 @property(nonatomic, nullable, readonly) CWVTranslationLanguage* language; | 40 @property(nonatomic, nullable, readonly) CWVTranslationLanguage* language; |
| 40 | 41 |
| 41 - (instancetype)init NS_UNAVAILABLE; | 42 - (instancetype)init NS_UNAVAILABLE; |
| 42 | 43 |
| 43 @end | 44 @end |
| 44 | 45 |
| 45 NS_ASSUME_NONNULL_END | 46 NS_ASSUME_NONNULL_END |
| 46 | 47 |
| 47 #endif // IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_POLICY_H | 48 #endif // IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_POLICY_H |
| OLD | NEW |