cellular_setup_base.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. #ifndef ASH_SERVICES_CELLULAR_SETUP_CELLULAR_SETUP_BASE_H_
  5. #define ASH_SERVICES_CELLULAR_SETUP_CELLULAR_SETUP_BASE_H_
  6. #include "ash/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
  7. #include "mojo/public/cpp/bindings/pending_receiver.h"
  8. #include "mojo/public/cpp/bindings/receiver_set.h"
  9. namespace ash::cellular_setup {
  10. // mojom::CellularSetup implementation which accepts receivers to bind to it.
  11. // This class does not implement any of mojom::CellularSetup's functions, so
  12. // derived classes should override them.
  13. class CellularSetupBase : public mojom::CellularSetup {
  14. public:
  15. CellularSetupBase(const CellularSetupBase&) = delete;
  16. CellularSetupBase& operator=(const CellularSetupBase&) = delete;
  17. ~CellularSetupBase() override;
  18. void BindReceiver(mojo::PendingReceiver<mojom::CellularSetup> receiver);
  19. protected:
  20. CellularSetupBase();
  21. private:
  22. mojo::ReceiverSet<mojom::CellularSetup> receivers_;
  23. };
  24. } // namespace ash::cellular_setup
  25. #endif // ASH_SERVICES_CELLULAR_SETUP_CELLULAR_SETUP_BASE_H_