Index: ios/chrome/browser/ui/stack_view/page_animation_util.mm |
diff --git a/ios/chrome/browser/ui/stack_view/page_animation_util.mm b/ios/chrome/browser/ui/stack_view/page_animation_util.mm |
index 3e66bd4c4b76ecaffb79eb2d6e049eef8334fe7d..a43792e0921d03856b0bc31a432e6dcb40226ed2 100644 |
--- a/ios/chrome/browser/ui/stack_view/page_animation_util.mm |
+++ b/ios/chrome/browser/ui/stack_view/page_animation_util.mm |
@@ -7,12 +7,15 @@ |
#import <QuartzCore/QuartzCore.h> |
#import <UIKit/UIKit.h> |
-#import "base/mac/scoped_nsobject.h" |
#import "ios/chrome/browser/ui/animation_util.h" |
#include "ios/chrome/browser/ui/rtl_geometry.h" |
#import "ios/chrome/browser/ui/stack_view/card_view.h" |
#import "ios/chrome/common/material_timing.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
using ios::material::TimingFunction; |
namespace { |
@@ -56,8 +59,8 @@ const CGFloat kAnimateOutAnchorY = 0; |
const UIEdgeInsets kShadowStretchInsets = {28.0, 28.0, 28.0, 28.0}; |
const UIEdgeInsets kShadowLayoutOutset = {-10.0, -11.0, -12.0, -11.0}; |
CGRect shadowFrame = UIEdgeInsetsInsetRect(frame, kShadowLayoutOutset); |
- base::scoped_nsobject<UIImageView> frameShadowImageView( |
- [[UIImageView alloc] initWithFrame:shadowFrame]); |
+ UIImageView* frameShadowImageView = |
+ [[UIImageView alloc] initWithFrame:shadowFrame]; |
[frameShadowImageView |
setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | |
UIViewAutoresizingFlexibleHeight)]; |
@@ -103,8 +106,7 @@ void AnimateInPaperWithAnimationAndCompletion(UIView* view, |
// Create paper background. |
CGRect paperFrame = CGRectOffset(endFrame, 0, paperOffset); |
paperFrame.size.height -= paperOffset; |
- base::scoped_nsobject<PaperView> paper( |
- [[PaperView alloc] initWithFrame:paperFrame]); |
+ PaperView* paper = [[PaperView alloc] initWithFrame:paperFrame]; |
[parent insertSubview:paper belowSubview:view]; |
[paper addSubview:view]; |
[paper setBackgroundColor:isOffTheRecord |
@@ -209,8 +211,7 @@ void AnimateNewBackgroundPageWithCompletion(CardView* currentPageCard, |
BOOL isPortrait, |
void (^completion)(void)) { |
// Create paper background. |
- base::scoped_nsobject<PaperView> paper( |
- [[PaperView alloc] initWithFrame:CGRectZero]); |
+ PaperView* paper = [[PaperView alloc] initWithFrame:CGRectZero]; |
UIView* parent = [currentPageCard superview]; |
[parent insertSubview:paper aboveSubview:currentPageCard]; |
CGRect pageBounds = currentPageCard.bounds; |