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

Unified Diff: remoting/ios/client_keyboard.mm

Issue 2869303003: Adding hooks to add the keyboard on screen and be able to dismiss it. (Closed)
Patch Set: Adding kKeyboardAnimationTime. Created 3 years, 7 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: remoting/ios/client_keyboard.mm
diff --git a/remoting/ios/client_keyboard.mm b/remoting/ios/client_keyboard.mm
new file mode 100644
index 0000000000000000000000000000000000000000..dccefab1bdadc93b6233cde12620eaff138366a8
--- /dev/null
+++ b/remoting/ios/client_keyboard.mm
@@ -0,0 +1,62 @@
+// 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.
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+#import "remoting/ios/client_keyboard.h"
+
+// TODO(nicholss): Look into inputAccessoryView to get the top bar for sending
+// special keys.
+// TODO(nicholss): Look into inputView - The custom input view to display when
+// the receiver becomes the first responder
+
+@implementation ClientKeyboard
+
+@synthesize autocapitalizationType = _autocapitalizationType;
+@synthesize autocorrectionType = _autocorrectionType;
+@synthesize keyboardAppearance = _keyboardAppearance;
+@synthesize keyboardType = _keyboardType;
+@synthesize spellCheckingType = _spellCheckingType;
+
+- (instancetype)init {
+ self = [super init];
+ if (self) {
+ _autocapitalizationType = UITextAutocapitalizationTypeNone;
+ _autocorrectionType = UITextAutocorrectionTypeNo;
+ _autocorrectionType = UITextAutocorrectionTypeNo;
+ _keyboardType = UIKeyboardTypeASCIICapable;
+ _spellCheckingType = UITextSpellCheckingTypeNo;
+ }
+ return self;
+}
+
+#pragma mark - UIKeyInput
+
+- (void)insertText:(NSString*)text {
+ NSLog(@"insertText: %@", text);
+}
+
+- (void)deleteBackward {
+ NSLog(@"deleteBackward");
+}
+
+- (BOOL)hasText {
+ return NO; // not sure if this enables the back button.
+}
+
+#pragma mark - UIResponder
+
+- (BOOL)canBecomeFirstResponder {
+ return YES;
+}
+
+- (UIView*)inputAccessoryView {
+ return nil;
+}
+
+#pragma mark - UITextInputTraits
+
+@end

Powered by Google App Engine
This is Rietveld 408576698