ios_util.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef BASE_IOS_IOS_UTIL_H_
  5. #define BASE_IOS_IOS_UTIL_H_
  6. #include <stdint.h>
  7. #include "base/base_export.h"
  8. #include "base/files/file_path.h"
  9. namespace base {
  10. namespace ios {
  11. // Returns whether the operating system is iOS 12 or later.
  12. // TODO(crbug.com/1129482): Remove once minimum supported version is at least 12
  13. BASE_EXPORT bool IsRunningOnIOS12OrLater();
  14. // Returns whether the operating system is iOS 13 or later.
  15. // TODO(crbug.com/1129483): Remove once minimum supported version is at least 13
  16. BASE_EXPORT bool IsRunningOnIOS13OrLater();
  17. // Returns whether the operating system is iOS 14 or later.
  18. // TODO(crbug.com/1129484): Remove once minimum supported version is at least 14
  19. BASE_EXPORT bool IsRunningOnIOS14OrLater();
  20. // Returns whether the operating system is at the given version or later.
  21. BASE_EXPORT bool IsRunningOnOrLater(int32_t major,
  22. int32_t minor,
  23. int32_t bug_fix);
  24. // Returns whether iOS is signalling that an RTL text direction should be used
  25. // regardless of the current locale. This should not return true if the current
  26. // language is a "real" RTL language such as Arabic or Urdu; it should only
  27. // return true in cases where the RTL text direction has been forced (for
  28. // example by using the "RTL Psuedolanguage" option when launching from XCode).
  29. BASE_EXPORT bool IsInForcedRTL();
  30. // Stores the |path| of the ICU dat file in a global to be referenced later by
  31. // FilePathOfICUFile(). This should only be called once.
  32. BASE_EXPORT void OverridePathOfEmbeddedICU(const char* path);
  33. // Returns the overriden path set by OverridePathOfEmbeddedICU(), otherwise
  34. // returns invalid FilePath.
  35. BASE_EXPORT FilePath FilePathOfEmbeddedICU();
  36. } // namespace ios
  37. } // namespace base
  38. #endif // BASE_IOS_IOS_UTIL_H_