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

Side by Side Diff: ios/chrome/browser/ui/stack_view/title_label.mm

Issue 2859503002: Revert of [ObjC ARC] Converts ios/chrome/browser/ui/stack_view:stack_view to ARC. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « ios/chrome/browser/ui/stack_view/stack_view_toolbar_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/title_label.h" 5 #import "ios/chrome/browser/ui/stack_view/title_label.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
13 @implementation TitleLabel { 9 @implementation TitleLabel {
14 __weak id _accessibilityTarget; 10 id _accessibilityTarget; // weak
15 SEL _accessibilityAction; 11 SEL _accessibilityAction;
16 } 12 }
17 13
18 - (void)addAccessibilityElementFocusedTarget:(id)accessibilityTarget 14 - (void)addAccessibilityElementFocusedTarget:(id)accessibilityTarget
19 action:(SEL)accessibilityAction { 15 action:(SEL)accessibilityAction {
20 DCHECK(!accessibilityTarget || 16 DCHECK(!accessibilityTarget ||
21 [accessibilityTarget respondsToSelector:accessibilityAction]); 17 [accessibilityTarget respondsToSelector:accessibilityAction]);
22 _accessibilityTarget = accessibilityTarget; 18 _accessibilityTarget = accessibilityTarget;
23 _accessibilityAction = accessibilityAction; 19 _accessibilityAction = accessibilityAction;
24 } 20 }
25 21
26 - (void)accessibilityElementDidBecomeFocused { 22 - (void)accessibilityElementDidBecomeFocused {
27 #pragma clang diagnostic push
28 #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
29 [_accessibilityTarget performSelector:_accessibilityAction withObject:self]; 23 [_accessibilityTarget performSelector:_accessibilityAction withObject:self];
30 #pragma clang diagnostic pop
31 } 24 }
32 25
33 @end 26 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/stack_view/stack_view_toolbar_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698