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

Unified Diff: ios/web/web_state/ui/crw_web_view_content_view.mm

Issue 2916473002: [ObjC ARC] Converts ios/web:web to ARC. (Closed)
Patch Set: Fixing silly mistake Created 3 years, 6 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
Index: ios/web/web_state/ui/crw_web_view_content_view.mm
diff --git a/ios/web/web_state/ui/crw_web_view_content_view.mm b/ios/web/web_state/ui/crw_web_view_content_view.mm
index cda73439b3d0f42c8103772e1e7ee1dfc7b1d2df..32aac34b93d43ffdccacce03efb885486ff80b34 100644
--- a/ios/web/web_state/ui/crw_web_view_content_view.mm
+++ b/ios/web/web_state/ui/crw_web_view_content_view.mm
@@ -7,7 +7,10 @@
#import <WebKit/WebKit.h>
#include "base/logging.h"
-#import "base/mac/scoped_nsobject.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
namespace {
@@ -21,10 +24,6 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
} // namespace
@interface CRWWebViewContentView () {
- // The web view being shown.
- base::scoped_nsobject<UIView> _webView;
- // The web view's scroll view.
- base::scoped_nsobject<UIScrollView> _scrollView;
// Backs up property of the same name if |_webView| is a WKWebView.
CGFloat _topContentPadding;
}
@@ -33,11 +32,17 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
// |_topContentPadding| (iff |_webView| is a WKWebView).
- (void)updateWebViewFrame;
+// The web view being shown.
+@property(nonatomic, strong, readwrite) UIView* webView;
+// The web view's scroll view.
+@property(nonatomic, strong, readwrite) UIScrollView* scrollView;
@end
@implementation CRWWebViewContentView
@synthesize shouldUseInsetForTopPadding = _shouldUseInsetForTopPadding;
+@synthesize webView = _webView;
+@synthesize scrollView = _scrollView;
- (instancetype)initWithWebView:(UIView*)webView
scrollView:(UIScrollView*)scrollView {
@@ -46,8 +51,8 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
DCHECK(webView);
DCHECK(scrollView);
DCHECK([scrollView isDescendantOfView:webView]);
- _webView.reset([webView retain]);
- _scrollView.reset([scrollView retain]);
+ _webView = webView;
+ _scrollView = scrollView;
}
return self;
}
@@ -97,16 +102,6 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
[self updateWebViewFrame];
}
-#pragma mark Accessors
-
-- (UIScrollView*)scrollView {
- return _scrollView.get();
-}
-
-- (UIView*)webView {
- return _webView.get();
-}
-
#pragma mark Layout
- (void)layoutSubviews {
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller_container_view.mm ('k') | ios/web/web_state/ui/crw_wk_script_message_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698