do_not_disturb_controller.cc 786 B

12345678910111213141516171819202122232425262728
  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. #include "ash/components/phonehub/do_not_disturb_controller.h"
  5. namespace ash {
  6. namespace phonehub {
  7. DoNotDisturbController::DoNotDisturbController() = default;
  8. DoNotDisturbController::~DoNotDisturbController() = default;
  9. void DoNotDisturbController::AddObserver(Observer* observer) {
  10. observer_list_.AddObserver(observer);
  11. }
  12. void DoNotDisturbController::RemoveObserver(Observer* observer) {
  13. observer_list_.RemoveObserver(observer);
  14. }
  15. void DoNotDisturbController::NotifyDndStateChanged() {
  16. for (auto& observer : observer_list_)
  17. observer.OnDndStateChanged();
  18. }
  19. } // namespace phonehub
  20. } // namespace ash