fake_tether_controller.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2020 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_COMPONENTS_PHONEHUB_FAKE_TETHER_CONTROLLER_H_
  5. #define ASH_COMPONENTS_PHONEHUB_FAKE_TETHER_CONTROLLER_H_
  6. #include "ash/components/phonehub/tether_controller.h"
  7. namespace ash {
  8. namespace phonehub {
  9. class FakeTetherController : public TetherController {
  10. public:
  11. FakeTetherController();
  12. ~FakeTetherController() override;
  13. using TetherController::NotifyAttemptConnectionScanFailed;
  14. void SetStatus(Status status);
  15. size_t num_scan_for_available_connection_calls() {
  16. return num_scan_for_available_connection_calls_;
  17. }
  18. // TetherController:
  19. Status GetStatus() const override;
  20. void ScanForAvailableConnection() override;
  21. private:
  22. // TetherController:
  23. void AttemptConnection() override;
  24. void Disconnect() override;
  25. Status status_;
  26. size_t num_scan_for_available_connection_calls_ = 0;
  27. };
  28. } // namespace phonehub
  29. } // namespace ash
  30. #endif // ASH_COMPONENTS_PHONEHUB_FAKE_TETHER_CONTROLLER_H_