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

Unified Diff: ios/chrome/browser/ui/stack_view/page_animation_util.mm

Issue 2944443003: [ObjC ARC] Converts ios/chrome/browser/ui/stack_view:stack_view to ARC. (Closed)
Patch Set: Add and use explicit disconnect in CardSet. 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
« no previous file with comments | « ios/chrome/browser/ui/stack_view/close_button.mm ('k') | ios/chrome/browser/ui/stack_view/stack_card.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ios/chrome/browser/ui/stack_view/close_button.mm ('k') | ios/chrome/browser/ui/stack_view/stack_card.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698