electron/atom/browser/ui/notification_delegate_adapter.cc

30 lines
950 B
C++
Raw Normal View History

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.
#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"
namespace atom {
2017-04-24 03:07:42 +00:00
AtomNotificationDelegateAdapter::AtomNotificationDelegateAdapter(
atom::api::Notification* target) {
observer_ = target;
}
void AtomNotificationDelegateAdapter::NotificationDisplayed() {
2017-04-24 03:07:42 +00:00
observer_->OnShown();
}
void AtomNotificationDelegateAdapter::NotificationClosed() {}
void AtomNotificationDelegateAdapter::NotificationClick() {
2017-04-24 03:07:42 +00:00
observer_->OnClicked();
}
2017-05-29 10:02:33 +00:00
void AtomNotificationDelegateAdapter::NotificationReplied(std::string reply) {
observer_->OnReplied(reply);
}
void AtomNotificationDelegateAdapter::NotificationDestroyed() {}
void AtomNotificationDelegateAdapter::NotificationFailed() {}
2017-04-24 03:07:42 +00:00
} // namespace atom