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

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: Tweaks to autorelease pool 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..82d1f90d5d72ea0283320d17c5b3841253339841 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 {
@@ -22,9 +25,9 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
@interface CRWWebViewContentView () {
// The web view being shown.
- base::scoped_nsobject<UIView> _webView;
+ UIView* _webView;
// The web view's scroll view.
- base::scoped_nsobject<UIScrollView> _scrollView;
+ UIScrollView* _scrollView;
// Backs up property of the same name if |_webView| is a WKWebView.
CGFloat _topContentPadding;
}
@@ -46,8 +49,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;
}
@@ -100,11 +103,11 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
#pragma mark Accessors
- (UIScrollView*)scrollView {
Eugene But (OOO till 7-30) 2017/06/12 06:12:52 Should we synthesize these accessors instead?
PL 2017/06/14 00:31:11 Yes! Done!
- return _scrollView.get();
+ return _scrollView;
}
- (UIView*)webView {
- return _webView.get();
+ return _webView;
}
#pragma mark Layout

Powered by Google App Engine
This is Rietveld 408576698