#include "chrome/browser/notifications/notification_display_queue.h"
#include <utility>
#include "base/ranges/algorithm.h"
#include "chrome/browser/notifications/notification_display_service.h"
#include "url/origin.h"
namespace {
bool IsWebNotification(NotificationHandler::Type notification_type) { … }
}
NotificationDisplayQueue::NotificationDisplayQueue(
NotificationDisplayService* notification_display_service)
: … { … }
NotificationDisplayQueue::~NotificationDisplayQueue() = default;
void NotificationDisplayQueue::OnBlockingStateChanged() { … }
bool NotificationDisplayQueue::ShouldEnqueueNotification(
NotificationHandler::Type notification_type,
const message_center::Notification& notification) const { … }
void NotificationDisplayQueue::EnqueueNotification(
NotificationHandler::Type notification_type,
const message_center::Notification& notification,
std::unique_ptr<NotificationCommon::Metadata> metadata) { … }
void NotificationDisplayQueue::RemoveQueuedNotification(
const std::string& notification_id) { … }
std::set<std::string> NotificationDisplayQueue::GetQueuedNotificationIds()
const { … }
std::set<std::string>
NotificationDisplayQueue::GetQueuedNotificationIdsForOrigin(
const GURL& origin) const { … }
void NotificationDisplayQueue::SetNotificationBlockers(
NotificationBlockers blockers) { … }
void NotificationDisplayQueue::AddNotificationBlocker(
std::unique_ptr<NotificationBlocker> blocker) { … }
bool NotificationDisplayQueue::DoRemoveQueuedNotification(
const std::string& notification_id,
bool notify) { … }
void NotificationDisplayQueue::MaybeDisplayQueuedNotifications() { … }
bool NotificationDisplayQueue::IsAnyNotificationBlockerActive(
const message_center::Notification& notification) const { … }
NotificationDisplayQueue::QueuedNotification::QueuedNotification(
NotificationHandler::Type notification_type,
const message_center::Notification& notification,
std::unique_ptr<NotificationCommon::Metadata> metadata)
: … { … }
NotificationDisplayQueue::QueuedNotification::QueuedNotification(
QueuedNotification&&) = default;
NotificationDisplayQueue::QueuedNotification&
NotificationDisplayQueue::QueuedNotification::operator=(QueuedNotification&&) =
default;
NotificationDisplayQueue::QueuedNotification::~QueuedNotification() = default;