[email protected] | aebcd0dd | 2012-10-05 17:48:58 | [diff] [blame] | 1 | // Copyright 2012 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 | #ifndef BASE_IOS_IOS_UTIL_H_ |
| 6 | #define BASE_IOS_IOS_UTIL_H_ |
| 7 | |
avi | 9b6f4293 | 2015-12-26 22:15:14 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
[email protected] | aebcd0dd | 2012-10-05 17:48:58 | [diff] [blame] | 10 | #include "base/base_export.h" |
justincohen | b83910d | 2016-01-08 23:49:43 | [diff] [blame] | 11 | #include "base/files/file_path.h" |
[email protected] | aebcd0dd | 2012-10-05 17:48:58 | [diff] [blame] | 12 | |
| 13 | namespace base { |
| 14 | namespace ios { |
| 15 | |
michaeldo | 19e74eb | 2016-06-16 23:58:10 | [diff] [blame] | 16 | // Returns whether the operating system is iOS 10 or later. |
| 17 | BASE_EXPORT bool IsRunningOnIOS10OrLater(); |
| 18 | |
rohitrao | de9bce7 | 2017-06-14 15:37:30 | [diff] [blame] | 19 | // Returns whether the operating system is iOS 11 or later. |
| 20 | BASE_EXPORT bool IsRunningOnIOS11OrLater(); |
| 21 | |
Justin Cohen | 8f8fd9b | 2018-06-13 20:03:11 | [diff] [blame^] | 22 | // Returns whether the operating system is iOS 12 or later. |
| 23 | BASE_EXPORT bool IsRunningOnIOS12OrLater(); |
| 24 | |
[email protected] | 1c95c21 | 2013-06-29 14:16:00 | [diff] [blame] | 25 | // Returns whether the operating system is at the given version or later. |
avi | 9b6f4293 | 2015-12-26 22:15:14 | [diff] [blame] | 26 | BASE_EXPORT bool IsRunningOnOrLater(int32_t major, |
| 27 | int32_t minor, |
| 28 | int32_t bug_fix); |
[email protected] | aebcd0dd | 2012-10-05 17:48:58 | [diff] [blame] | 29 | |
marq | f51b003 | 2015-08-10 08:55:17 | [diff] [blame] | 30 | // Returns whether iOS is signalling that an RTL text direction should be used |
marq | b2238de | 2015-09-21 17:06:21 | [diff] [blame] | 31 | // regardless of the current locale. This should not return true if the current |
| 32 | // language is a "real" RTL language such as Arabic or Urdu; it should only |
| 33 | // return true in cases where the RTL text direction has been forced (for |
| 34 | // example by using the "RTL Psuedolanguage" option when launching from XCode). |
marq | f51b003 | 2015-08-10 08:55:17 | [diff] [blame] | 35 | BASE_EXPORT bool IsInForcedRTL(); |
| 36 | |
justincohen | b83910d | 2016-01-08 23:49:43 | [diff] [blame] | 37 | // Stores the |path| of the ICU dat file in a global to be referenced later by |
| 38 | // FilePathOfICUFile(). This should only be called once. |
| 39 | BASE_EXPORT void OverridePathOfEmbeddedICU(const char* path); |
| 40 | |
| 41 | // Returns the overriden path set by OverridePathOfEmbeddedICU(), otherwise |
| 42 | // returns invalid FilePath. |
| 43 | BASE_EXPORT FilePath FilePathOfEmbeddedICU(); |
| 44 | |
[email protected] | aebcd0dd | 2012-10-05 17:48:58 | [diff] [blame] | 45 | } // namespace ios |
| 46 | } // namespace base |
| 47 | |
| 48 | #endif // BASE_IOS_IOS_UTIL_H_ |