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

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

Issue 2675633002: Let CRIWVWebView inherit UIView instead of NSObject. (Closed)
Patch Set: Fix format. Created 3 years, 10 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/criwv_web_view_delegate.h ('k') | no next file » | 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 274a624514c458be2bb80842c814c188e526f55a..5d7837ae61bd41ed14c879b7a4efce11a79a2b82 100644
--- a/ios/web_view/shell/shell_view_controller.m
+++ b/ios/web_view/shell/shell_view_controller.m
@@ -20,7 +20,7 @@
// Toolbar containing navigation buttons and |field|.
@property(nonatomic, strong) UIToolbar* toolbar;
// CRIWV view which renders the web page.
-@property(nonatomic, strong) id<CRIWVWebView> webView;
+@property(nonatomic, strong) CRIWVWebView* webView;
// Handles the translation of the content displayed in |webView|.
@property(nonatomic, strong) TranslateController* translateController;
@@ -120,13 +120,11 @@
[_toolbar addSubview:stop];
[_toolbar addSubview:_field];
- self.webView = [CRIWV webView];
+ self.webView = [CRIWV webViewWithFrame:[_containerView bounds]];
[_webView setDelegate:self];
- UIView* view = [_webView view];
- [_containerView addSubview:view];
- [view setFrame:[_containerView bounds]];
- [view setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
- UIViewAutoresizingFlexibleHeight];
+ [_webView setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
+ UIViewAutoresizingFlexibleHeight];
+ [_containerView addSubview:_webView];
[_webView loadURL:[NSURL URLWithString:@"https://www.google.com/"]];
}
@@ -172,7 +170,7 @@
#pragma mark CRIWVWebViewDelegate methods
-- (void)webView:(id<CRIWVWebView>)webView
+- (void)webView:(CRIWVWebView*)webView
didFinishLoadingWithURL:(NSURL*)url
loadSuccess:(BOOL)loadSuccess {
// TODO(crbug.com/679895): Add some visual indication that the page load has
@@ -180,7 +178,7 @@
[self updateToolbar];
}
-- (void)webView:(id<CRIWVWebView>)webView
+- (void)webView:(CRIWVWebView*)webView
didUpdateWithChanges:(CRIWVWebViewUpdateType)changes {
if (changes & CRIWVWebViewUpdateTypeProgress) {
// TODO(crbug.com/679895): Add a progress indicator.
« no previous file with comments | « ios/web_view/public/criwv_web_view_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698