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

Side by Side 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 unified diff | Download patch
OLDNEW
(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 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support."
7 #endif
8
9 #import "remoting/ios/client_keyboard.h"
10
11 // TODO(nicholss): Look into inputAccessoryView to get the top bar for sending
12 // special keys.
13 // TODO(nicholss): Look into inputView - The custom input view to display when
14 // the receiver becomes the first responder
15
16 @implementation ClientKeyboard
17
18 @synthesize autocapitalizationType = _autocapitalizationType;
19 @synthesize autocorrectionType = _autocorrectionType;
20 @synthesize keyboardAppearance = _keyboardAppearance;
21 @synthesize keyboardType = _keyboardType;
22 @synthesize spellCheckingType = _spellCheckingType;
23
24 - (instancetype)init {
25 self = [super init];
26 if (self) {
27 _autocapitalizationType = UITextAutocapitalizationTypeNone;
28 _autocorrectionType = UITextAutocorrectionTypeNo;
29 _autocorrectionType = UITextAutocorrectionTypeNo;
30 _keyboardType = UIKeyboardTypeASCIICapable;
31 _spellCheckingType = UITextSpellCheckingTypeNo;
32 }
33 return self;
34 }
35
36 #pragma mark - UIKeyInput
37
38 - (void)insertText:(NSString*)text {
39 NSLog(@"insertText: %@", text);
40 }
41
42 - (void)deleteBackward {
43 NSLog(@"deleteBackward");
44 }
45
46 - (BOOL)hasText {
47 return NO; // not sure if this enables the back button.
48 }
49
50 #pragma mark - UIResponder
51
52 - (BOOL)canBecomeFirstResponder {
53 return YES;
54 }
55
56 - (UIView*)inputAccessoryView {
57 return nil;
58 }
59
60 #pragma mark - UITextInputTraits
61
62 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698