OLD | NEW |
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/bookmarks/bookmark_extended_button.h" | 5 #import "ios/chrome/browser/ui/bookmarks/bookmark_extended_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 | |
13 namespace { | 9 namespace { |
14 // Apple's guidelines indicate that buttons should have a minimum touch area of | 10 // Apple's guidelines indicate that buttons should have a minimum touch area of |
15 // 44pt x 44pt. | 11 // 44pt x 44pt. |
16 CGFloat kMinimumLength = 44; | 12 CGFloat kMinimumLength = 44; |
17 } // namespace | 13 } // namespace |
18 | 14 |
19 @interface BookmarkExtendedButton () | 15 @interface BookmarkExtendedButton () |
20 @property(nonatomic, assign) BOOL doesExtendEdges; | 16 @property(nonatomic, assign) BOOL doesExtendEdges; |
21 @end | 17 @end |
22 | 18 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 65 |
70 - (CGRect)accessibilityFrame { | 66 - (CGRect)accessibilityFrame { |
71 CGRect touchArea = [self touchArea]; | 67 CGRect touchArea = [self touchArea]; |
72 CGRect touchAreaInWindowCoordinates = [self convertRect:touchArea toView:nil]; | 68 CGRect touchAreaInWindowCoordinates = [self convertRect:touchArea toView:nil]; |
73 CGRect touchAreaInScreenCoordinates = | 69 CGRect touchAreaInScreenCoordinates = |
74 [self.window convertRect:touchAreaInWindowCoordinates toWindow:nil]; | 70 [self.window convertRect:touchAreaInWindowCoordinates toWindow:nil]; |
75 return touchAreaInScreenCoordinates; | 71 return touchAreaInScreenCoordinates; |
76 } | 72 } |
77 | 73 |
78 @end | 74 @end |
OLD | NEW |