features.cc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright 2017 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. #include "device/base/features.h"
  5. #include "build/build_config.h"
  6. namespace device {
  7. #if BUILDFLAG(IS_MAC)
  8. const base::Feature kNewUsbBackend{"NewUsbBackend",
  9. base::FEATURE_DISABLED_BY_DEFAULT};
  10. #endif // BUILDFLAG(IS_MAC)
  11. #if BUILDFLAG(IS_WIN)
  12. const base::Feature kNewBLEWinImplementation{"NewBLEWinImplementation",
  13. base::FEATURE_ENABLED_BY_DEFAULT};
  14. // Controls whether a more reliable GATT session handling
  15. // implementation is used on Windows 10 1709 (RS3) and beyond.
  16. //
  17. // Disabled due to crbug/1120338.
  18. const base::Feature kNewBLEGattSessionHandling{
  19. "NewBLEGattSessionHandling", base::FEATURE_DISABLED_BY_DEFAULT};
  20. #endif // BUILDFLAG(IS_WIN)
  21. #if BUILDFLAG(ENABLE_VR)
  22. // Controls whether the orientation sensor based device is enabled.
  23. const base::Feature kWebXrOrientationSensorDevice {
  24. "WebXROrientationSensorDevice",
  25. #if BUILDFLAG(IS_ANDROID)
  26. base::FEATURE_ENABLED_BY_DEFAULT
  27. #else
  28. // TODO(https://crbug.com/820308, https://crbug.com/773829): Enable once
  29. // platform specific bugs have been fixed.
  30. base::FEATURE_DISABLED_BY_DEFAULT
  31. #endif
  32. };
  33. #endif // BUILDFLAG(ENABLE_VR)
  34. namespace features {
  35. #if BUILDFLAG(ENABLE_OPENXR)
  36. // Controls WebXR support for the OpenXR Runtime.
  37. const base::Feature kOpenXR{"OpenXR", base::FEATURE_ENABLED_BY_DEFAULT};
  38. // Some WebXR features may have been enabled for ARCore, but are not yet ready
  39. // to be plumbed up from the OpenXR backend. This feature provides a mechanism
  40. // to gate such support in a generic way. Note that this feature should not be
  41. // used for features we intend to ship simultaneously on both OpenXR and ArCore.
  42. // For those features, a feature-specific flag should be created if needed.
  43. const base::Feature kOpenXrExtendedFeatureSupport{
  44. "OpenXrExtendedFeatureSupport", base::FEATURE_DISABLED_BY_DEFAULT};
  45. // Controls whether shared images are used for OpenXR Runtime
  46. const base::Feature kOpenXRSharedImages{"OpenXRSharedImages",
  47. base::FEATURE_DISABLED_BY_DEFAULT};
  48. #endif // ENABLE_OPENXR
  49. // Enables access to articulated hand tracking sensor input.
  50. const base::Feature kWebXrHandInput{"WebXRHandInput",
  51. base::FEATURE_DISABLED_BY_DEFAULT};
  52. // Enables access to raycasting against estimated XR scene geometry.
  53. const base::Feature kWebXrHitTest{"WebXRHitTest",
  54. base::FEATURE_ENABLED_BY_DEFAULT};
  55. // Enables access to experimental WebXR features.
  56. const base::Feature kWebXrIncubations{"WebXRIncubations",
  57. base::FEATURE_DISABLED_BY_DEFAULT};
  58. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
  59. // Controls whether Web Bluetooth should support confirm-only and confirm-PIN
  60. // pairing mode on Win/Linux
  61. const base::Feature kWebBluetoothConfirmPairingSupport{
  62. "WebBluetoothConfirmPairingSupport", base::FEATURE_DISABLED_BY_DEFAULT};
  63. #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
  64. } // namespace features
  65. } // namespace device