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

Unified Diff: ios/web_view/shell/shell_view_controller.m

Issue 2839093002: Implemented new Translate API for purely Objective-C clients. (Closed)
Patch Set: merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web_view/shell/shell_translation_delegate.m ('k') | ios/web_view/shell/translate_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/shell/shell_view_controller.m
diff --git a/ios/web_view/shell/shell_view_controller.m b/ios/web_view/shell/shell_view_controller.m
index da1433f275a0b6cefad0bb564657951b3f99f2e4..6cd9fc5da59533723847f467c51296705925bdb1 100644
--- a/ios/web_view/shell/shell_view_controller.m
+++ b/ios/web_view/shell/shell_view_controller.m
@@ -7,7 +7,7 @@
#import <ChromeWebView/ChromeWebView.h>
#import <MobileCoreServices/MobileCoreServices.h>
-#import "ios/web_view/shell/translate_controller.h"
+#import "ios/web_view/shell/shell_translation_delegate.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -32,7 +32,7 @@ NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
// CWV view which renders the web page.
@property(nonatomic, strong) CWVWebView* webView;
// Handles the translation of the content displayed in |webView|.
-@property(nonatomic, strong) TranslateController* translateController;
+@property(nonatomic, strong) ShellTranslationDelegate* translationDelegate;
- (void)back;
- (void)forward;
@@ -45,7 +45,7 @@ NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
@synthesize field = _field;
@synthesize toolbar = _toolbar;
@synthesize webView = _webView;
-@synthesize translateController = _translateController;
+@synthesize translationDelegate = _translationDelegate;
- (void)viewDidLoad {
[super viewDidLoad];
@@ -155,8 +155,8 @@ NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
_webView.restorationIdentifier = @"webView";
_webView.navigationDelegate = self;
_webView.UIDelegate = self;
- _translateController = [[TranslateController alloc] init];
- _webView.translationDelegate = _translateController;
+ _translationDelegate = [[ShellTranslationDelegate alloc] init];
+ _webView.translationController.delegate = _translationDelegate;
[_webView setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight];
« no previous file with comments | « ios/web_view/shell/shell_translation_delegate.m ('k') | ios/web_view/shell/translate_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698