chromium/ui/message_center/popup_timers_controller.h

// Copyright 2016 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_POPUP_TIMERS_CONTROLLER_H_
#define UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_

#include <map>
#include <memory>
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_observer.h"
#include "ui/message_center/popup_timer.h"

namespace message_center {

// A class that manages all the timers running for individual notification popup
// windows.  It supports weak pointers in order to allow safe callbacks when
// timers expire.
// We can use SupportsWeakPtr<> because PopupTimer does not
// access this class in its destructor so it is safe to invalidate weak pointers
// after we destroy |popup_timers_|
class MESSAGE_CENTER_EXPORT PopupTimersController
    : public MessageCenterObserver,
      public PopupTimer::Delegate {};

}  // namespace message_center

#endif  // UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_