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

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

Issue 2567203002: Revert of [ObjC ARC] Converts ios/chrome/browser/ui:ui to ARC. (Closed)
Patch Set: Created 4 years 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/chrome/browser/ui/reversed_animation.mm
diff --git a/ios/chrome/browser/ui/reversed_animation.mm b/ios/chrome/browser/ui/reversed_animation.mm
index 557c7d8d951ad691d808ad7efc027fcfbc238c2b..58ce55b77ea93c49c14a7dbd0e30d1f1e73e61b9 100644
--- a/ios/chrome/browser/ui/reversed_animation.mm
+++ b/ios/chrome/browser/ui/reversed_animation.mm
@@ -9,10 +9,7 @@
#include <cmath>
#include "base/logging.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
+#include "base/mac/objc_property_releaser.h"
@protocol ReversedAnimationProtocol;
typedef CAAnimation<ReversedAnimationProtocol> ReversedAnimation;
@@ -63,7 +60,10 @@
#pragma mark - ReversedBasicAnimation
-@interface ReversedBasicAnimation : CABasicAnimation<ReversedAnimationProtocol>
+@interface ReversedBasicAnimation
+ : CABasicAnimation<ReversedAnimationProtocol> {
+ base::mac::ObjCPropertyReleaser _propertyReleaser_ReversedBasicAnimation;
+}
// Returns an animation that performs |animation| in reverse when added to
// |layer|. |parentBeginTime| should be set to the beginTime in absolute time
@@ -80,6 +80,15 @@
@synthesize originalAnimation = _originalAnimation;
@synthesize animationDirection = _animationDirection;
@synthesize animationTimeOffset = _animationTimeOffset;
+
+- (instancetype)init {
+ self = [super init];
+ if (self) {
+ _propertyReleaser_ReversedBasicAnimation.Init(
+ self, [ReversedBasicAnimation class]);
+ }
+ return self;
+}
- (instancetype)copyWithZone:(NSZone*)zone {
ReversedBasicAnimation* copy = [super copyWithZone:zone];
@@ -127,7 +136,10 @@
#pragma mark - ReversedAnimationGroup
-@interface ReversedAnimationGroup : CAAnimationGroup<ReversedAnimationProtocol>
+@interface ReversedAnimationGroup
+ : CAAnimationGroup<ReversedAnimationProtocol> {
+ base::mac::ObjCPropertyReleaser _propertyReleaser_ReversedAnimationGroup;
+}
// Returns an animation that performs |animation| in reverse when added to
// |layer|. |parentBeginTime| should be set to the beginTime in absolute time
@@ -144,6 +156,15 @@
@synthesize originalAnimation = _originalAnimation;
@synthesize animationDirection = _animationDirection;
@synthesize animationTimeOffset = _animationTimeOffset;
+
+- (instancetype)init {
+ self = [super init];
+ if (self) {
+ _propertyReleaser_ReversedAnimationGroup.Init(
+ self, [ReversedAnimationGroup class]);
+ }
+ return self;
+}
- (instancetype)copyWithZone:(NSZone*)zone {
ReversedAnimationGroup* copy = [super copyWithZone:zone];
« no previous file with comments | « ios/chrome/browser/ui/orientation_limiting_navigation_controller.mm ('k') | ios/chrome/browser/ui/rtl_geometry.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698