fake_find_my_device_controller.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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_FIND_MY_DEVICE_CONTROLLER_H_
  5. #define ASH_COMPONENTS_PHONEHUB_FAKE_FIND_MY_DEVICE_CONTROLLER_H_
  6. #include "ash/components/phonehub/find_my_device_controller.h"
  7. namespace ash {
  8. namespace phonehub {
  9. class FakeFindMyDeviceController : public FindMyDeviceController {
  10. public:
  11. FakeFindMyDeviceController();
  12. ~FakeFindMyDeviceController() override;
  13. void SetPhoneRingingState(Status status);
  14. // FindMyDeviceController:
  15. void SetPhoneRingingStatusInternal(Status status) override;
  16. void RequestNewPhoneRingingState(bool ringing) override;
  17. Status GetPhoneRingingStatus() override;
  18. void SetShouldRequestFail(bool is_request_fail);
  19. private:
  20. Status phone_ringing_status_ = Status::kRingingOff;
  21. // Indicates if the connection to the phone is working correctly. If it is
  22. // true, there is a problem and the phone cannot change its state.
  23. bool should_request_fail_ = false;
  24. };
  25. } // namespace phonehub
  26. } // namespace ash
  27. #endif // ASH_COMPONENTS_PHONEHUB_FAKE_FIND_MY_DEVICE_CONTROLLER_H_