| Index: ios/chrome/browser/ui/stack_view/close_button.mm
|
| diff --git a/ios/chrome/browser/ui/stack_view/close_button.mm b/ios/chrome/browser/ui/stack_view/close_button.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..45ff4f353afa49a7efd4198321591db427ca9f34
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/stack_view/close_button.mm
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#import "ios/chrome/browser/ui/stack_view/close_button.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +@implementation CloseButton {
|
| + id _accessibilityTarget; // weak
|
| + SEL _accessibilityAction;
|
| +}
|
| +
|
| +- (void)addAccessibilityElementFocusedTarget:(id)accessibilityTarget
|
| + action:(SEL)accessibilityAction {
|
| + DCHECK(!accessibilityTarget ||
|
| + [accessibilityTarget respondsToSelector:accessibilityAction]);
|
| + _accessibilityTarget = accessibilityTarget;
|
| + _accessibilityAction = accessibilityAction;
|
| +}
|
| +
|
| +- (void)accessibilityElementDidBecomeFocused {
|
| + [_accessibilityTarget performSelector:_accessibilityAction withObject:self];
|
| +}
|
| +
|
| +@end
|
|
|