binder_overrides.cc 817 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 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 "services/device/binder_overrides.h"
  5. #include "base/no_destructor.h"
  6. #include "build/build_config.h"
  7. namespace device {
  8. namespace internal {
  9. GeolocationContextBinder& GetGeolocationContextBinderOverride() {
  10. static base::NoDestructor<GeolocationContextBinder> binder;
  11. return *binder;
  12. }
  13. PressureManagerBinder& GetPressureManagerBinderOverride() {
  14. static base::NoDestructor<PressureManagerBinder> binder;
  15. return *binder;
  16. }
  17. #if BUILDFLAG(IS_ANDROID)
  18. NFCProviderBinder& GetNFCProviderBinderOverride() {
  19. static base::NoDestructor<NFCProviderBinder> binder;
  20. return *binder;
  21. }
  22. #endif
  23. } // namespace internal
  24. } // namespace device