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

Unified Diff: ios/chrome/browser/ui/toolbar/keyboard_accessory_view_protocol.h

Issue 2934463002: [iOS] Add experimental new keyboard accessory view. (Closed)
Patch Set: Split KeyboardAccessoryView into 2 classes. Created 3 years, 6 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/toolbar/keyboard_accessory_view_protocol.h
diff --git a/ios/chrome/browser/ui/toolbar/keyboard_accessory_view_protocol.h b/ios/chrome/browser/ui/toolbar/keyboard_accessory_view_protocol.h
new file mode 100644
index 0000000000000000000000000000000000000000..cca0c48b8cf8ea84d6c2fa7a13705c81430f4f5a
--- /dev/null
+++ b/ios/chrome/browser/ui/toolbar/keyboard_accessory_view_protocol.h
@@ -0,0 +1,41 @@
+// Copyright 2017 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.
+
+#ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_KEYBOARD_ACCESSORY_VIEW_PROTOCOL_H_
+#define IOS_CHROME_BROWSER_UI_TOOLBAR_KEYBOARD_ACCESSORY_VIEW_PROTOCOL_H_
+
+#import <UIKit/UIKIt.h>
+
+// Delegate protocol for the KeyboardAccessoryView.
+@protocol KeyboardAccessoryViewDelegate
+
+// Notifies the delegate that the Voice Search button was pressed.
+- (void)keyboardAccessoryVoiceSearchTouchDown;
+
+// Notifies the delegate that a touch up occured in the the Voice Search button.
+- (void)keyboardAccessoryVoiceSearchTouchUpInside;
+
+// Notifies the delegate that a touch up occured in the the Camera Search
+// button.
+- (void)keyboardAccessoryCameraSearchTouchUpInside;
+
+// Notifies the delegate that a key with the title |title| was pressed.
+- (void)keyPressed:(NSString*)title;
+
+@end
+
+typedef NS_ENUM(NSInteger, KeyboardAccessoryViewMode) {
+ VOICE_SEARCH = 0,
+ KEY_SHORTCUTS
+};
+
+// Protocol the keyboard accessory views must implement.
+@protocol KeyboardAccessoryViewProtocol
+
+// The mode in which the KeyboardAccessoryView is in.
+@property(nonatomic) KeyboardAccessoryViewMode mode;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_TOOLBAR_KEYBOARD_ACCESSORY_VIEW_PROTOCOL_H_

Powered by Google App Engine
This is Rietveld 408576698