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

Unified Diff: ios/web/web_state/crw_web_view_proxy_impl.mm

Issue 2396553002: [ARC] Converts part of ios/web/ui to ARC.
Patch Set: co Created 4 years, 2 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/web_state/crw_pass_kit_downloader.mm ('k') | ios/web/web_state/crw_web_view_scroll_view_proxy.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/crw_web_view_proxy_impl.mm
diff --git a/ios/web/web_state/crw_web_view_proxy_impl.mm b/ios/web/web_state/crw_web_view_proxy_impl.mm
index 73c6b03459b8ddf7c1a3ae81e66cd40eb7c6ea91..9996420585aa46fa6f314cf02734cd33e42b5f16 100644
--- a/ios/web/web_state/crw_web_view_proxy_impl.mm
+++ b/ios/web/web_state/crw_web_view_proxy_impl.mm
@@ -5,12 +5,15 @@
#import "ios/web/web_state/crw_web_view_proxy_impl.h"
#include "base/ios/ios_util.h"
-#include "base/ios/weak_nsobject.h"
#include "base/mac/scoped_nsobject.h"
#import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h"
#import "ios/web/public/web_state/ui/crw_content_view.h"
#import "ios/web/web_state/ui/crw_web_controller.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Returns the first responder in the subviews of |view|, or nil if no view in
@@ -66,20 +69,20 @@ UIView* GetFirstResponderSubview(UIView* view) {
@end
@implementation CRWWebViewProxyImpl {
- base::WeakNSObject<CRWContentView> _contentView;
- base::WeakNSObject<CRWWebController> _webController;
+ __weak CRWWebController* _webController;
base::scoped_nsobject<NSMutableDictionary> _registeredInsets;
// The WebViewScrollViewProxy is a wrapper around the web view's
// UIScrollView to give components access in a limited and controlled manner.
base::scoped_nsobject<CRWWebViewScrollViewProxy> _contentViewScrollViewProxy;
}
+@synthesize contentView = _contentView;
- (instancetype)initWithWebController:(CRWWebController*)webController {
self = [super init];
if (self) {
DCHECK(webController);
_registeredInsets.reset([[NSMutableDictionary alloc] init]);
- _webController.reset(webController);
+ _webController = webController;
_contentViewScrollViewProxy.reset([[CRWWebViewScrollViewProxy alloc] init]);
}
return self;
@@ -146,12 +149,8 @@ UIView* GetFirstResponderSubview(UIView* view) {
[_registeredInsets removeObjectForKey:callerValue];
}
-- (CRWContentView*)contentView {
- return _contentView.get();
-}
-
- (void)setContentView:(CRWContentView*)contentView {
- _contentView.reset(contentView);
+ _contentView = contentView;
[_contentViewScrollViewProxy setScrollView:contentView.scrollView];
}
« no previous file with comments | « ios/web/web_state/crw_pass_kit_downloader.mm ('k') | ios/web/web_state/crw_web_view_scroll_view_proxy.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698