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

Unified Diff: ios/chrome/browser/ui/fullscreen_controller.mm

Issue 2804703002: [ObjC ARC] Converts ios/chrome/browser/ui:ui_internal_arc to ARC. (Closed)
Patch Set: comments Created 3 years, 8 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/chrome/browser/ui/fade_truncated_label.mm ('k') | ios/chrome/browser/ui/key_commands_provider.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/fullscreen_controller.mm
diff --git a/ios/chrome/browser/ui/fullscreen_controller.mm b/ios/chrome/browser/ui/fullscreen_controller.mm
index 6a1eeb96fb46f4943cf548fc458cb4f1645b01c9..e2eae0ceeadba799b2970f7b003301db27245f56 100644
--- a/ios/chrome/browser/ui/fullscreen_controller.mm
+++ b/ios/chrome/browser/ui/fullscreen_controller.mm
@@ -7,7 +7,7 @@
#include <cmath>
#include "base/logging.h"
-#include "base/mac/objc_property_releaser.h"
+
#import "ios/chrome/browser/ui/browser_view_controller.h"
#import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h"
#import "ios/chrome/browser/ui/tabs/tab_strip_controller.h"
@@ -20,6 +20,10 @@
#import "ios/web/public/web_state/ui/crw_web_view_proxy.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
+
NSString* const kSetupForTestingWillCloseAllTabsNotification =
@"kSetupForTestingWillCloseAllTabsNotification";
@@ -67,21 +71,20 @@ BOOL CGFloatEquals(CGFloat a, CGFloat b) {
// full screen.
uint fullScreenLock_;
// CRWWebViewProxy object allows web view manipulations.
- base::scoped_nsprotocol<id<CRWWebViewProxy>> webViewProxy_;
- base::mac::ObjCPropertyReleaser propertyReleaser_FullScreenController_;
+ id<CRWWebViewProxy> webViewProxy_;
}
// Access to the UIWebView's UIScrollView.
-@property(nonatomic, readonly) CRWWebViewScrollViewProxy* scrollViewProxy;
+@property(weak, nonatomic, readonly) CRWWebViewScrollViewProxy* scrollViewProxy;
// The navigation controller of the page.
@property(nonatomic, readonly, assign) NavigationManager* navigationManager;
// The gesture recognizer set on the scrollview to detect tap. Must be readwrite
// for property releaser to work.
-@property(nonatomic, readwrite, retain)
+@property(nonatomic, readwrite, strong)
UITapGestureRecognizer* userInteractionGestureRecognizer;
// The delegate responsible for providing the header height and moving the
// header.
-@property(nonatomic, readonly) id<FullScreenControllerDelegate> delegate;
+@property(weak, nonatomic, readonly) id<FullScreenControllerDelegate> delegate;
// Current height of the header, in points. This is a pass-through method that
// fetches the header height from the FullScreenControllerDelegate.
@property(nonatomic, readonly) CGFloat headerHeight;
@@ -190,15 +193,9 @@ BOOL CGFloatEquals(CGFloat a, CGFloat b) {
- (id)initWithDelegate:(id<FullScreenControllerDelegate>)delegate
navigationManager:(NavigationManager*)navigationManager
sessionID:(NSString*)sessionID {
- if (!gEnabledForTests) {
- propertyReleaser_FullScreenController_.Init(self,
- [FullScreenController class]);
- [self release];
+ if (!gEnabledForTests)
return nil;
- }
if ((self = [super init])) {
- propertyReleaser_FullScreenController_.Init(self,
- [FullScreenController class]);
DCHECK(sessionID);
DCHECK(delegate);
delegate_ = delegate;
@@ -316,7 +313,6 @@ BOOL CGFloatEquals(CGFloat a, CGFloat b) {
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
}
- (CRWWebViewScrollViewProxy*)scrollViewProxy {
@@ -700,7 +696,7 @@ BOOL CGFloatEquals(CGFloat a, CGFloat b) {
- (void)setWebViewProxy:(id<CRWWebViewProxy>)webViewProxy
controller:(CRWWebController*)webController {
DCHECK([webViewProxy scrollViewProxy]);
- webViewProxy_.reset([webViewProxy retain]);
+ webViewProxy_ = webViewProxy;
[[webViewProxy scrollViewProxy] addObserver:self];
}
« no previous file with comments | « ios/chrome/browser/ui/fade_truncated_label.mm ('k') | ios/chrome/browser/ui/key_commands_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698