Make Notification factory function a member of NotificationPresenter so that we can create different types of notifications based on runtime conditions.

This commit is contained in:
Ales Pergl 2017-01-10 16:34:41 +01:00
parent 0981807261
commit e6a30388da
12 changed files with 22 additions and 26 deletions

View file

@ -18,7 +18,8 @@ NotificationPresenter::~NotificationPresenter() {
base::WeakPtr<Notification> NotificationPresenter::CreateNotification(
NotificationDelegate* delegate) {
Notification* notification = Notification::Create(delegate, this);
Notification* notification = CreateNotificationObject(delegate);
if (!notification) return {};
notifications_.insert(notification);
return notification->GetWeakPtr();
}