2017-04-24 03:07:42 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2017-04-23 23:47:18 +00:00
|
|
|
#include "atom/browser/ui/notification_delegate_adapter.h"
|
|
|
|
|
|
|
|
#include "atom/browser/api/atom_api_notification.h"
|
2017-05-22 16:17:59 +00:00
|
|
|
#include "brightray/browser/notification_delegate.h"
|
2017-04-23 23:47:18 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2017-04-24 03:07:42 +00:00
|
|
|
AtomNotificationDelegateAdapter::AtomNotificationDelegateAdapter(
|
|
|
|
atom::api::Notification* target) {
|
|
|
|
observer_ = target;
|
2017-04-23 23:47:18 +00:00
|
|
|
}
|
|
|
|
void AtomNotificationDelegateAdapter::NotificationDisplayed() {
|
2017-04-24 03:07:42 +00:00
|
|
|
observer_->OnShown();
|
2017-04-23 23:47:18 +00:00
|
|
|
}
|
|
|
|
void AtomNotificationDelegateAdapter::NotificationClosed() {}
|
|
|
|
void AtomNotificationDelegateAdapter::NotificationClick() {
|
2017-04-24 03:07:42 +00:00
|
|
|
observer_->OnClicked();
|
2017-04-23 23:47:18 +00:00
|
|
|
}
|
2017-05-29 10:02:33 +00:00
|
|
|
void AtomNotificationDelegateAdapter::NotificationReplied(std::string reply) {
|
|
|
|
observer_->OnReplied(reply);
|
|
|
|
}
|
2017-04-23 23:47:18 +00:00
|
|
|
void AtomNotificationDelegateAdapter::NotificationDestroyed() {}
|
|
|
|
void AtomNotificationDelegateAdapter::NotificationFailed() {}
|
|
|
|
|
2017-04-24 03:07:42 +00:00
|
|
|
} // namespace atom
|