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

Unified Diff: ios/web_view/public/cwv_preferences.h

Issue 2983453002: Expose way to enable/disable translate. (Closed)
Patch Set: addressed michaeldo's comments Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web_view/public/ChromeWebView.h ('k') | ios/web_view/public/cwv_translation_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/public/cwv_preferences.h
diff --git a/ios/web_view/public/cwv_preferences.h b/ios/web_view/public/cwv_preferences.h
new file mode 100644
index 0000000000000000000000000000000000000000..194df0d82abc4cc6dff13060cfca32410d8c4a6f
--- /dev/null
+++ b/ios/web_view/public/cwv_preferences.h
@@ -0,0 +1,28 @@
+// 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_PREFERENCES_H_
+#define IOS_WEB_VIEW_PUBLIC_CWV_PREFERENCES_H_
+
+#import <Foundation/Foundation.h>
+
+#import "cwv_export.h"
+
+// Preferences for user settings.
+CWV_EXPORT
+@interface CWVPreferences : NSObject
+
+// Whether or not translation as a feature is turned on.
+@property(nonatomic, assign, getter=isTranslationEnabled)
+ BOOL translationEnabled;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Resets all translation settings back to default. In particular, this will
+// change all translation policies back to CWVTranslationPolicyAsk.
+- (void)resetTranslationSettings;
+
+@end
+
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_PREFERENCES_H_
« no previous file with comments | « ios/web_view/public/ChromeWebView.h ('k') | ios/web_view/public/cwv_translation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698