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

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

Issue 2436903002: Removed uses of IsRunningOnIOS9OrLater in crw_web_ or wk_web_view_ (Closed)
Patch Set: Created 4 years, 2 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/test/wk_web_view_crash_utils.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | 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"
8 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
9 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h" 8 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h"
10 #import "ios/web/public/web_state/ui/crw_content_view.h" 9 #import "ios/web/public/web_state/ui/crw_content_view.h"
11 #import "ios/web/web_state/ui/crw_web_controller.h" 10 #import "ios/web/web_state/ui/crw_web_controller.h"
12 11
13 #if !defined(__has_feature) || !__has_feature(objc_arc) 12 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support." 13 #error "This file requires ARC support."
15 #endif 14 #endif
16 15
17 namespace { 16 namespace {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return _contentView != nil && [_webController contentIsHTML]; 161 return _contentView != nil && [_webController contentIsHTML];
163 } 162 }
164 163
165 - (UIView*)keyboardAccessory { 164 - (UIView*)keyboardAccessory {
166 if (!_contentView) 165 if (!_contentView)
167 return nil; 166 return nil;
168 UIView* firstResponder = GetFirstResponderSubview(_contentView); 167 UIView* firstResponder = GetFirstResponderSubview(_contentView);
169 return firstResponder.inputAccessoryView; 168 return firstResponder.inputAccessoryView;
170 } 169 }
171 170
172 #if defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
173 - (UITextInputAssistantItem*)inputAssistantItem { 171 - (UITextInputAssistantItem*)inputAssistantItem {
174 DCHECK(base::ios::IsRunningOnIOS9OrLater())
175 << "Cannot retrieve inputAssistantItem on iOS versions earlier than 9.";
176 if (!_contentView) 172 if (!_contentView)
177 return nil; 173 return nil;
178 UIView* firstResponder = GetFirstResponderSubview(_contentView); 174 UIView* firstResponder = GetFirstResponderSubview(_contentView);
179 return firstResponder.inputAssistantItem; 175 return firstResponder.inputAssistantItem;
180 } 176 }
181 #endif
182 177
183 - (BOOL)becomeFirstResponder { 178 - (BOOL)becomeFirstResponder {
184 return [_contentView becomeFirstResponder]; 179 return [_contentView becomeFirstResponder];
185 } 180 }
186 181
187 @end 182 @end
OLDNEW
« no previous file with comments | « ios/web/test/wk_web_view_crash_utils.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698