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

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

Issue 2615883002: Fix for voice-over accessibility issue with tab switcher. (Closed)
Patch Set: Created 3 years, 11 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_panel_cell.mm
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
index d0361e391a1f99f3eea3ffc3a83974331ad3d0f6..1bd0b37542d00c85ac81ed7c85cf73c081e4c8f1 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
@@ -31,7 +31,7 @@ const CGFloat kCellCornerRadius = 2;
const CGFloat kBarHeight = 44;
const CGFloat kTitleLabelTextAlpha = .54;
const CGFloat kNewTabIconAlpha = .87;
-} // Anonymous namespace
+}
CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
return kBarHeight;
@@ -50,6 +50,8 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
CGSize _cachedShadowSize;
}
+@synthesize delegate = _delegate;
+
// Returns the cell's identifier used for the cell's re-use.
+ (NSString*)identifier {
return NSStringFromClass([self class]);
@@ -106,7 +108,6 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
base::scoped_nsobject<UIImageView> _snapshot;
base::scoped_nsobject<TabSwitcherButton> _snapshotButton;
PendingSnapshotRequest _currentPendingSnapshotRequest;
- id<SessionCellDelegate> _delegate; // weak
}
- (instancetype)initWithFrame:(CGRect)frame {
@@ -262,16 +263,12 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
[_snapshot setBackgroundColor:snapshotBackgroundColor];
}
-- (void)setDelegate:(id<SessionCellDelegate>)delegate {
- _delegate = delegate;
-}
-
- (void)snapshotPressed {
- [_delegate cellPressed:self];
+ [self.delegate cellPressed:self];
}
- (void)closeButtonPressed {
- [_delegate deleteButtonPressedForCell:self];
+ [self.delegate deleteButtonPressedForCell:self];
}
- (void)prepareForReuse {
@@ -283,7 +280,7 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
}
- (TabSwitcherCache*)cache {
- return [_delegate tabSwitcherCache];
+ return [self.delegate tabSwitcherCache];
}
#pragma mark - UIAccessibilityAction
@@ -309,7 +306,6 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
base::scoped_nsobject<UIView> _verticallyCenteredView;
base::scoped_nsobject<TabSwitcherButton> _raisedButton;
base::scoped_nsobject<NSOperation> _faviconObtainer;
- id<SessionCellDelegate> _delegate; // weak
}
- (instancetype)initWithFrame:(CGRect)frame {
@@ -430,12 +426,8 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
[operationQueue addOperation:_faviconObtainer];
}
-- (void)setDelegate:(id<SessionCellDelegate>)delegate {
- _delegate = delegate;
-}
-
- (void)cellPressed {
- [_delegate cellPressed:self];
+ [self.delegate cellPressed:self];
}
- (void)prepareForReuse {

Powered by Google App Engine
This is Rietveld 408576698