test_notifier_settings_controller.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_SYSTEM_MESSAGE_CENTER_TEST_NOTIFIER_SETTINGS_CONTROLLER_H_
  5. #define ASH_SYSTEM_MESSAGE_CENTER_TEST_NOTIFIER_SETTINGS_CONTROLLER_H_
  6. #include "ash/public/cpp/notifier_settings_controller.h"
  7. #include "base/observer_list.h"
  8. namespace ash {
  9. class TestNotifierSettingsController : public NotifierSettingsController {
  10. public:
  11. TestNotifierSettingsController();
  12. TestNotifierSettingsController(const TestNotifierSettingsController&) =
  13. delete;
  14. TestNotifierSettingsController& operator=(
  15. const TestNotifierSettingsController&) = delete;
  16. ~TestNotifierSettingsController() override;
  17. void set_no_notifiers(bool no_notifiers) { no_notifiers_ = no_notifiers; }
  18. // NotifierSettingsController:
  19. void GetNotifiers() override;
  20. void SetNotifierEnabled(const message_center::NotifierId& notifier_id,
  21. bool enabled) override;
  22. void AddNotifierSettingsObserver(NotifierSettingsObserver* observer) override;
  23. void RemoveNotifierSettingsObserver(
  24. NotifierSettingsObserver* observer) override;
  25. private:
  26. bool no_notifiers_ = false;
  27. base::ObserverList<NotifierSettingsObserver> observers_;
  28. };
  29. } // namespace ash
  30. #endif // ASH_SYSTEM_MESSAGE_CENTER_TEST_NOTIFIER_SETTINGS_CONTROLLER_H_