electron/shell/browser/notifications/linux/notification_presenter_linux.cc

29 lines
928 B
C++
Raw Normal View History

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2013-12-18 23:20:00 -06:00
// Copyright (c) 2013 Patrick Reynolds <piki@github.com>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "shell/browser/notifications/linux/notification_presenter_linux.h"
#include "shell/browser/notifications/linux/libnotify_notification.h"
namespace electron {
// static
NotificationPresenter* NotificationPresenter::Create() {
2015-12-25 11:52:19 +08:00
if (!LibnotifyNotification::Initialize())
2015-12-24 10:46:08 +08:00
return nullptr;
2015-12-25 11:52:19 +08:00
return new NotificationPresenterLinux;
}
NotificationPresenterLinux::NotificationPresenterLinux() = default;
2013-12-18 23:05:19 -06:00
NotificationPresenterLinux::~NotificationPresenterLinux() = default;
Notification* NotificationPresenterLinux::CreateNotificationObject(
NotificationDelegate* delegate) {
return new LibnotifyNotification(delegate, this);
}
} // namespace electron