OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_KEYBOARD_ACCESSORY_VIEW_PROTOCOL_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_KEYBOARD_ACCESSORY_VIEW_PROTOCOL_H_ |
| 7 |
| 8 #import <UIKit/UIKIt.h> |
| 9 |
| 10 // Delegate protocol for the KeyboardAccessoryView. |
| 11 @protocol KeyboardAccessoryViewDelegate |
| 12 |
| 13 // Notifies the delegate that the Voice Search button was pressed. |
| 14 - (void)keyboardAccessoryVoiceSearchTouchDown; |
| 15 |
| 16 // Notifies the delegate that a touch up occured in the the Voice Search button. |
| 17 - (void)keyboardAccessoryVoiceSearchTouchUpInside; |
| 18 |
| 19 // Notifies the delegate that a touch up occured in the the Camera Search |
| 20 // button. |
| 21 - (void)keyboardAccessoryCameraSearchTouchUpInside; |
| 22 |
| 23 // Notifies the delegate that a key with the title |title| was pressed. |
| 24 - (void)keyPressed:(NSString*)title; |
| 25 |
| 26 @end |
| 27 |
| 28 typedef NS_ENUM(NSInteger, KeyboardAccessoryViewMode) { |
| 29 VOICE_SEARCH = 0, |
| 30 KEY_SHORTCUTS |
| 31 }; |
| 32 |
| 33 // Protocol the keyboard accessory views must implement. |
| 34 @protocol KeyboardAccessoryViewProtocol |
| 35 |
| 36 // The mode in which the KeyboardAccessoryView is in. |
| 37 @property(nonatomic) KeyboardAccessoryViewMode mode; |
| 38 |
| 39 @end |
| 40 |
| 41 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_KEYBOARD_ACCESSORY_VIEW_PROTOCOL_H_ |
OLD | NEW |