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

Unified Diff: ios/chrome/browser/ui/uikit_ui_util.mm

Issue 2430463003: Removed use of IsRunningOnIOS8OrLater from ui_util and uikit_ui_util (Closed)
Patch Set: one line!!!1! 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/ui_util.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/uikit_ui_util.mm
diff --git a/ios/chrome/browser/ui/uikit_ui_util.mm b/ios/chrome/browser/ui/uikit_ui_util.mm
index a8a62ca12afd6c3099d020b6bfb5f7d5bd1d4e87..2ceb5e1c4703ebbff3448fa3d040362ece5522c2 100644
--- a/ios/chrome/browser/ui/uikit_ui_util.mm
+++ b/ios/chrome/browser/ui/uikit_ui_util.mm
@@ -454,12 +454,7 @@ UIInterfaceOrientation GetInterfaceOrientation() {
}
CGFloat CurrentKeyboardHeight(NSValue* keyboardFrameValue) {
- CGSize keyboardSize = [keyboardFrameValue CGRectValue].size;
- if (base::ios::IsRunningOnIOS8OrLater()) {
- return keyboardSize.height;
- } else {
- return IsPortrait() ? keyboardSize.height : keyboardSize.width;
- }
+ return [keyboardFrameValue CGRectValue].size.height;
}
UIImage* ImageWithColor(UIColor* color) {
@@ -618,13 +613,8 @@ void AddSameSizeConstraint(UIView* view1, UIView* view2) {
}
bool IsCompact(id<UITraitEnvironment> environment) {
- if (base::ios::IsRunningOnIOS8OrLater()) {
- return environment.traitCollection.horizontalSizeClass ==
- UIUserInterfaceSizeClassCompact;
- } else {
- // Prior to iOS 8, iPad is always regular, iPhone is always compact.
- return !IsIPadIdiom();
- }
+ return environment.traitCollection.horizontalSizeClass ==
+ UIUserInterfaceSizeClassCompact;
}
bool IsCompact() {
« no previous file with comments | « ios/chrome/browser/ui/ui_util.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698