Richard Knoll | e100fd2 | 2020-09-24 15:45:17 | [diff] [blame^] | 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 | |
| 5 | #include "chrome/browser/notifications/notification_blocker.h" |
| 6 | |
| 7 | NotificationBlocker::NotificationBlocker() = default; |
| 8 | |
| 9 | NotificationBlocker::~NotificationBlocker() = default; |
| 10 | |
| 11 | void NotificationBlocker::NotifyBlockingStateChanged() { |
| 12 | for (auto& observer : observers_) |
| 13 | observer.OnBlockingStateChanged(); |
| 14 | } |
| 15 | |
| 16 | void NotificationBlocker::AddObserver(Observer* observer) { |
| 17 | observers_.AddObserver(observer); |
| 18 | } |
| 19 | |
| 20 | void NotificationBlocker::RemoveObserver(Observer* observer) { |
| 21 | observers_.RemoveObserver(observer); |
| 22 | } |