chromium/ui/message_center/message_center_impl.h

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_
#define UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_

#include <stddef.h>

#include <memory>
#include <string>
#include <vector>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/observer_list.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_observer.h"
#include "ui/message_center/message_center_stats_collector.h"
#include "ui/message_center/message_center_types.h"
#include "ui/message_center/notification_blocker.h"
#include "ui/message_center/popup_timers_controller.h"
#include "ui/message_center/public/cpp/notification.h"
#include "ui/message_center/public/cpp/notifier_id.h"

namespace message_center {

class LockScreenController;

// The default implementation of MessageCenter.
class MessageCenterImpl : public MessageCenter,
                          public NotificationBlocker::Observer {};

#if BUILDFLAG(IS_CHROMEOS_ASH)
// A scoped class to override the params of the notification limit feature.
// NOTE: There should be at the most one instance at any given time.
class MESSAGE_CENTER_EXPORT ScopedNotificationLimitOverrider {
 public:
  ScopedNotificationLimitOverrider(size_t limit, size_t target_count);
  ScopedNotificationLimitOverrider(const ScopedNotificationLimitOverrider&) =
      delete;
  ScopedNotificationLimitOverrider& operator=(
      const ScopedNotificationLimitOverrider&) = delete;
  ~ScopedNotificationLimitOverrider();

  const size_t overriding_limit;
  const size_t overriding_target_count;
};
#endif  // IS_CHROMEOS_ASH

}  // namespace message_center

#endif  // UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_