2015-12-25 02:16:07 +00:00
|
|
|
// Copyright (c) 2015 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2013-03-28 21:49:29 +00:00
|
|
|
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_H_
|
|
|
|
#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_H_
|
|
|
|
|
2015-12-25 02:16:07 +00:00
|
|
|
#include <set>
|
2015-04-20 20:20:50 +00:00
|
|
|
|
2015-12-25 02:16:07 +00:00
|
|
|
#include "base/memory/weak_ptr.h"
|
2013-03-28 21:49:29 +00:00
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
2015-12-25 02:16:07 +00:00
|
|
|
class Notification;
|
|
|
|
class NotificationDelegate;
|
|
|
|
|
2013-03-28 21:49:29 +00:00
|
|
|
class NotificationPresenter {
|
|
|
|
public:
|
2013-03-28 22:03:58 +00:00
|
|
|
static NotificationPresenter* Create();
|
|
|
|
|
2015-12-25 02:16:07 +00:00
|
|
|
virtual ~NotificationPresenter();
|
|
|
|
|
|
|
|
base::WeakPtr<Notification> CreateNotification(
|
|
|
|
NotificationDelegate* delegate);
|
|
|
|
|
|
|
|
std::set<Notification*> notifications() const { return notifications_; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
NotificationPresenter();
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class Notification;
|
|
|
|
|
|
|
|
void RemoveNotification(Notification* notification);
|
|
|
|
|
|
|
|
std::set<Notification*> notifications_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(NotificationPresenter);
|
2013-03-28 21:49:29 +00:00
|
|
|
};
|
|
|
|
|
2013-11-17 23:20:17 +00:00
|
|
|
} // namespace brightray
|
2013-03-28 21:49:29 +00:00
|
|
|
|
|
|
|
#endif
|