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

Unified Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_view.mm

Issue 2810193002: [ObjC ARC] Converts ios/chrome/browser/ui/tab_switcher:tab_switcher to ARC. (Closed)
Patch Set: comment 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
Index: ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_view.mm
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_view.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_view.mm
index fda92e3d8ea2271b2b2eb0071f57700c6a8da20b..90255dff40bbe82765a8a34cd53d69b20fafa80f 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_view.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_view.mm
@@ -8,11 +8,13 @@
#import <QuartzCore/QuartzCore.h>
-#import "base/ios/weak_nsobject.h"
#include "base/mac/foundation_util.h"
-#include "base/mac/scoped_nsobject.h"
#include "ios/chrome/browser/ui/rtl_geometry.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
// Returns the animation drag coefficient set by the iPhone simulator.
// This is useful when debugging with the simulator because when
// "slow animation" mode is toggled, it only impacts UIKit animations not
@@ -106,16 +108,15 @@ const CGFloat kTabFoldAnimationDuration = 0.15;
_animatingFold = YES;
[self setUserInteractionEnabled:NO];
[CATransaction begin];
- base::WeakNSObject<TabSwitcherTabStripPlaceholderView> weakSelf(self);
+ __weak TabSwitcherTabStripPlaceholderView* weakSelf = self;
[CATransaction setCompletionBlock:^{
- base::scoped_nsobject<TabSwitcherTabStripPlaceholderView> strongSelf(
- [weakSelf retain]);
+ TabSwitcherTabStripPlaceholderView* strongSelf = weakSelf;
if (!strongSelf) {
if (completion)
completion();
return;
}
- strongSelf.get()->_animatingFold = NO;
+ strongSelf->_animatingFold = NO;
[strongSelf setUserInteractionEnabled:YES];
if (completion)
completion();

Powered by Google App Engine
This is Rietveld 408576698