| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_KEYBOARD_ACCESSORY_VIEW_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_KEYBOARD_ACCESSORY_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_KEYBOARD_ACCESSORY_VIEW_H_ | 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_KEYBOARD_ACCESSORY_VIEW_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKIt.h> | 8 #import <UIKit/UIKIt.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/toolbar/keyboard_accessory_view_protocol.h" | 10 #import "ios/chrome/browser/ui/toolbar/keyboard_accessory_view_protocol.h" |
| 11 | 11 |
| 12 // Accessory View above the keyboard. | 12 // Accessory View above the keyboard. |
| 13 // Shows keys that are shortcuts to commonly used characters or strings, | 13 // Shows keys that are shortcuts to commonly used characters or strings, |
| 14 // and buttons to start Voice Search or a Camera Search. | 14 // and buttons to start Voice Search or a Camera Search. |
| 15 // Must only be used on iPhones as iPads have a different pattern regarding | |
| 16 // keyboard shortcuts. | |
| 17 @interface NewKeyboardAccessoryView | 15 @interface NewKeyboardAccessoryView |
| 18 : UIInputView<KeyboardAccessoryViewProtocol, UIInputViewAudioFeedback> | 16 : UIInputView<KeyboardAccessoryViewProtocol, UIInputViewAudioFeedback> |
| 19 | 17 |
| 20 // Designated initializer. |buttonTitles| lists the titles of the shortcut | 18 // Designated initializer. |buttonTitles| lists the titles of the shortcut |
| 21 // buttons. |delegate| receives the various events triggered in the view. Not | 19 // buttons. |delegate| receives the various events triggered in the view. Not |
| 22 // retained, and can be nil. | 20 // retained, and can be nil. |
| 23 - (instancetype)initWithButtons:(NSArray<NSString*>*)buttonTitles | 21 - (instancetype)initWithButtons:(NSArray<NSString*>*)buttonTitles |
| 24 delegate:(id<KeyboardAccessoryViewDelegate>)delegate | 22 delegate:(id<KeyboardAccessoryViewDelegate>)delegate |
| 25 NS_DESIGNATED_INITIALIZER; | 23 NS_DESIGNATED_INITIALIZER; |
| 26 | 24 |
| 27 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; | 25 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; |
| 28 | 26 |
| 29 - (instancetype)initWithFrame:(CGRect)frame | 27 - (instancetype)initWithFrame:(CGRect)frame |
| 30 inputViewStyle:(UIInputViewStyle)inputViewStyle NS_UNAVAILABLE; | 28 inputViewStyle:(UIInputViewStyle)inputViewStyle NS_UNAVAILABLE; |
| 31 | 29 |
| 32 @end | 30 @end |
| 33 | 31 |
| 34 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_KEYBOARD_ACCESSORY_VIEW_H_ | 32 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_KEYBOARD_ACCESSORY_VIEW_H_ |
| OLD | NEW |