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

Side by Side Diff: ios/web/web_state/crw_web_view_proxy_impl.mm

Issue 1363633002: Remove deprecated method getKeyboardAccessory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « ios/web/public/web_state/crw_web_view_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import "ios/web/web_state/crw_web_view_proxy_impl.h" 5 #import "ios/web/web_state/crw_web_view_proxy_impl.h"
6 6
7 #include "base/ios/ios_util.h" 7 #include "base/ios/ios_util.h"
8 #include "base/ios/weak_nsobject.h" 8 #include "base/ios/weak_nsobject.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h" 10 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 - (void)addSubview:(UIView*)view { 133 - (void)addSubview:(UIView*)view {
134 return [_contentView addSubview:view]; 134 return [_contentView addSubview:view];
135 } 135 }
136 136
137 - (BOOL)hasSearchableTextContent { 137 - (BOOL)hasSearchableTextContent {
138 return _contentView != nil && [_webController contentIsHTML]; 138 return _contentView != nil && [_webController contentIsHTML];
139 } 139 }
140 140
141 - (UIView*)getKeyboardAccessory {
142 return [self keyboardAccessory];
143 }
144
145 - (UIView*)keyboardAccessory { 141 - (UIView*)keyboardAccessory {
146 if (!_contentView) 142 if (!_contentView)
147 return nil; 143 return nil;
148 UIView* firstResponder = GetFirstResponderSubview(_contentView); 144 UIView* firstResponder = GetFirstResponderSubview(_contentView);
149 return firstResponder.inputAccessoryView; 145 return firstResponder.inputAccessoryView;
150 } 146 }
151 147
152 #if defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 148 #if defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
153 - (UITextInputAssistantItem*)inputAssistantItem { 149 - (UITextInputAssistantItem*)inputAssistantItem {
154 DCHECK(base::ios::IsRunningOnIOS9OrLater()) 150 DCHECK(base::ios::IsRunningOnIOS9OrLater())
155 << "Cannot retrieve inputAssistantItem on iOS versions earlier than 9."; 151 << "Cannot retrieve inputAssistantItem on iOS versions earlier than 9.";
156 if (!_contentView) 152 if (!_contentView)
157 return nil; 153 return nil;
158 UIView* firstResponder = GetFirstResponderSubview(_contentView); 154 UIView* firstResponder = GetFirstResponderSubview(_contentView);
159 return firstResponder.inputAssistantItem; 155 return firstResponder.inputAssistantItem;
160 } 156 }
161 #endif 157 #endif
162 158
163 - (BOOL)keyboardDisplayRequiresUserAction { 159 - (BOOL)keyboardDisplayRequiresUserAction {
164 return [_webController keyboardDisplayRequiresUserAction]; 160 return [_webController keyboardDisplayRequiresUserAction];
165 } 161 }
166 162
167 - (void)setKeyboardDisplayRequiresUserAction: 163 - (void)setKeyboardDisplayRequiresUserAction:
168 (BOOL)keyboardDisplayRequiresUserAction { 164 (BOOL)keyboardDisplayRequiresUserAction {
169 [_webController 165 [_webController
170 setKeyboardDisplayRequiresUserAction:keyboardDisplayRequiresUserAction]; 166 setKeyboardDisplayRequiresUserAction:keyboardDisplayRequiresUserAction];
171 } 167 }
172 168
173 @end 169 @end
OLDNEW
« no previous file with comments | « ios/web/public/web_state/crw_web_view_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698