| OLD | NEW |
| 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 #include "ios/chrome/browser/ui/ui_util.h" | 5 #include "ios/chrome/browser/ui/ui_util.h" |
| 6 | 6 |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
| 10 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 10 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 11 #include "ui/ios/uikit_util.h" | 11 #include "ui/gfx/ios/uikit_util.h" |
| 12 | 12 |
| 13 bool IsIPadIdiom() { | 13 bool IsIPadIdiom() { |
| 14 UIUserInterfaceIdiom idiom = [[UIDevice currentDevice] userInterfaceIdiom]; | 14 UIUserInterfaceIdiom idiom = [[UIDevice currentDevice] userInterfaceIdiom]; |
| 15 return idiom == UIUserInterfaceIdiomPad; | 15 return idiom == UIUserInterfaceIdiomPad; |
| 16 } | 16 } |
| 17 | 17 |
| 18 bool IsHighResScreen() { | 18 bool IsHighResScreen() { |
| 19 return [[UIScreen mainScreen] scale] > 1.0; | 19 return [[UIScreen mainScreen] scale] > 1.0; |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 projectTo.size = targetSize; | 149 projectTo.size = targetSize; |
| 150 break; | 150 break; |
| 151 } | 151 } |
| 152 | 152 |
| 153 projectTo = CGRectIntegral(projectTo); | 153 projectTo = CGRectIntegral(projectTo); |
| 154 // There's no CGSizeIntegral, faking one instead. | 154 // There's no CGSizeIntegral, faking one instead. |
| 155 CGRect integralRect = CGRectZero; | 155 CGRect integralRect = CGRectZero; |
| 156 integralRect.size = targetSize; | 156 integralRect.size = targetSize; |
| 157 targetSize = CGRectIntegral(integralRect).size; | 157 targetSize = CGRectIntegral(integralRect).size; |
| 158 } | 158 } |
| OLD | NEW |