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