privileged_host_device_setter_base.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2018 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 ASH_SERVICES_MULTIDEVICE_SETUP_PRIVILEGED_HOST_DEVICE_SETTER_BASE_H_
  5. #define ASH_SERVICES_MULTIDEVICE_SETUP_PRIVILEGED_HOST_DEVICE_SETTER_BASE_H_
  6. #include "ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom.h"
  7. #include "mojo/public/cpp/bindings/pending_receiver.h"
  8. #include "mojo/public/cpp/bindings/receiver_set.h"
  9. namespace ash {
  10. namespace multidevice_setup {
  11. // PrivilegedHostDeviceSetter implementation which accepts receivers to bind to
  12. // it.
  13. class PrivilegedHostDeviceSetterBase
  14. : public mojom::PrivilegedHostDeviceSetter {
  15. public:
  16. PrivilegedHostDeviceSetterBase(const PrivilegedHostDeviceSetterBase&) =
  17. delete;
  18. PrivilegedHostDeviceSetterBase& operator=(
  19. const PrivilegedHostDeviceSetterBase&) = delete;
  20. ~PrivilegedHostDeviceSetterBase() override;
  21. void BindReceiver(
  22. mojo::PendingReceiver<mojom::PrivilegedHostDeviceSetter> receiver);
  23. protected:
  24. PrivilegedHostDeviceSetterBase();
  25. private:
  26. mojo::ReceiverSet<mojom::PrivilegedHostDeviceSetter> receivers_;
  27. };
  28. } // namespace multidevice_setup
  29. } // namespace ash
  30. #endif // ASH_SERVICES_MULTIDEVICE_SETUP_PRIVILEGED_HOST_DEVICE_SETTER_BASE_H_