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

Side by Side Diff: ios/chrome/browser/ui/stack_view/close_button.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/stack_view/close_button.h" 5 #import "ios/chrome/browser/ui/stack_view/close_button.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 @implementation CloseButton { 13 @implementation CloseButton {
10 id _accessibilityTarget; // weak 14 __weak id _accessibilityTarget;
11 SEL _accessibilityAction; 15 SEL _accessibilityAction;
12 } 16 }
13 17
14 - (void)addAccessibilityElementFocusedTarget:(id)accessibilityTarget 18 - (void)addAccessibilityElementFocusedTarget:(id)accessibilityTarget
15 action:(SEL)accessibilityAction { 19 action:(SEL)accessibilityAction {
16 DCHECK(!accessibilityTarget || 20 DCHECK(!accessibilityTarget ||
17 [accessibilityTarget respondsToSelector:accessibilityAction]); 21 [accessibilityTarget respondsToSelector:accessibilityAction]);
18 _accessibilityTarget = accessibilityTarget; 22 _accessibilityTarget = accessibilityTarget;
19 _accessibilityAction = accessibilityAction; 23 _accessibilityAction = accessibilityAction;
20 } 24 }
21 25
22 - (void)accessibilityElementDidBecomeFocused { 26 - (void)accessibilityElementDidBecomeFocused {
27 #pragma clang diagnostic push
28 #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
23 [_accessibilityTarget performSelector:_accessibilityAction withObject:self]; 29 [_accessibilityTarget performSelector:_accessibilityAction withObject:self];
30 #pragma clang diagnostic pop
24 } 31 }
25 32
26 @end 33 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/stack_view/card_view.mm ('k') | ios/chrome/browser/ui/stack_view/page_animation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698