OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ios/web_view/shell/translate_controller.h" | 5 #import "ios/web_view/shell/translate_controller.h" |
6 | 6 |
| 7 #import <ChromeWebView/ChromeWebView.h> |
7 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
8 | 9 |
9 #import "ios/web_view/public/cwv_translate_manager.h" | |
10 | |
11 #if !defined(__has_feature) || !__has_feature(objc_arc) | 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
12 #error "This file requires ARC support." | 11 #error "This file requires ARC support." |
13 #endif | 12 #endif |
14 | 13 |
15 @interface TranslateController () | 14 @interface TranslateController () |
16 // Action Sheet to prompt user whether or not the page should be translated. | 15 // Action Sheet to prompt user whether or not the page should be translated. |
17 @property(nonatomic, strong) UIAlertController* beforeTranslateActionSheet; | 16 @property(nonatomic, strong) UIAlertController* beforeTranslateActionSheet; |
18 // Manager which performs the translation of the content. | 17 // Manager which performs the translation of the content. |
19 @property(nonatomic, strong) id<CWVTranslateManager> translateManager; | 18 @property(nonatomic, strong) id<CWVTranslateManager> translateManager; |
20 @end | 19 @end |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 [_beforeTranslateActionSheet addAction:translateAction]; | 58 [_beforeTranslateActionSheet addAction:translateAction]; |
60 | 59 |
61 [[UIApplication sharedApplication].keyWindow.rootViewController | 60 [[UIApplication sharedApplication].keyWindow.rootViewController |
62 presentViewController:_beforeTranslateActionSheet | 61 presentViewController:_beforeTranslateActionSheet |
63 animated:YES | 62 animated:YES |
64 completion:nil]; | 63 completion:nil]; |
65 } | 64 } |
66 } | 65 } |
67 | 66 |
68 @end | 67 @end |
OLD | NEW |