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

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

Issue 2965303002: Expose method to reset translate settings. (Closed)
Patch Set: no policies for incognito 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/internal/web_view_browser_state.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/public/cwv_translation_controller.h
diff --git a/ios/web_view/public/cwv_translation_controller.h b/ios/web_view/public/cwv_translation_controller.h
index ee3106649081725778d7c3999c2ca9b73fe042d1..d5a7988bed873957af35e585293d1ef420fb9515 100644
--- a/ios/web_view/public/cwv_translation_controller.h
+++ b/ios/web_view/public/cwv_translation_controller.h
@@ -52,6 +52,10 @@ CWV_EXPORT
@property(nonatomic, readonly)
NSSet<CWVTranslationLanguage*>* supportedLanguages;
+// Resets all translation policies to CWVTranslationPolicyAsk.
+// Only resets non-incognito settings.
++ (void)resetTranslationPolicies;
+
// Begins translation on the current page from |sourceLanguage| to
// |targetLanguage|. These language parameters must be chosen from
// |supportedLanguages|. Set |userInitiated| to YES if translation
@@ -70,6 +74,7 @@ CWV_EXPORT
// Sets or retrieves translation policies associated with a specified language.
// |pageLanguage| should be the language code of the language.
+// Early returns in incognito mode.
Hiroshi Ichikawa 2017/07/10 05:58:39 Optional: Maybe better to make it an assertion fai
jzw1 2017/07/10 06:04:05 Done.
- (void)setTranslationPolicy:(CWVTranslationPolicy*)policy
forPageLanguage:(CWVTranslationLanguage*)pageLanguage;
- (CWVTranslationPolicy*)translationPolicyForPageLanguage:
@@ -77,6 +82,7 @@ CWV_EXPORT
// Sets or retrieves translation policies associated with a specified page.
// |pageHost| should be the hostname of the website. Must not be empty.
+// Early returns in incognito mode.
Hiroshi Ichikawa 2017/07/10 05:58:39 Ditto.
jzw1 2017/07/10 06:04:05 Done.
- (void)setTranslationPolicy:(CWVTranslationPolicy*)policy
forPageHost:(NSString*)pageHost;
- (CWVTranslationPolicy*)translationPolicyForPageHost:(NSString*)pageHost;
« no previous file with comments | « ios/web_view/internal/web_view_browser_state.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698