fake_do_not_disturb_controller.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_DO_NOT_DISTURB_CONTROLLER_H_
  5. #define ASH_COMPONENTS_PHONEHUB_FAKE_DO_NOT_DISTURB_CONTROLLER_H_
  6. #include "ash/components/phonehub/do_not_disturb_controller.h"
  7. namespace ash {
  8. namespace phonehub {
  9. class FakeDoNotDisturbController : public DoNotDisturbController {
  10. public:
  11. FakeDoNotDisturbController();
  12. ~FakeDoNotDisturbController() override;
  13. // DoNotDisturbController:
  14. bool IsDndEnabled() const override;
  15. void SetDoNotDisturbStateInternal(bool is_dnd_enabled,
  16. bool can_request_new_dnd_state) override;
  17. void RequestNewDoNotDisturbState(bool enabled) override;
  18. bool CanRequestNewDndState() const override;
  19. void SetShouldRequestFail(bool should_request_fail);
  20. private:
  21. bool is_dnd_enabled_ = false;
  22. bool can_request_new_dnd_state_ = false;
  23. // Indicates if the connection to the phone is working correctly. If it is
  24. // true, there is a problem and the phone cannot change its state.
  25. bool should_request_fail_ = false;
  26. };
  27. } // namespace phonehub
  28. } // namespace ash
  29. #endif // ASH_COMPONENTS_PHONEHUB_FAKE_DO_NOT_DISTURB_CONTROLLER_H_