Decouple notification code from content module
This commit is contained in:
parent
6f81d1e29f
commit
5b7c7be804
15 changed files with 316 additions and 139 deletions
33
brightray/browser/notification_delegate_adapter.cc
Normal file
33
brightray/browser/notification_delegate_adapter.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "browser/notification_delegate_adapter.h"
|
||||
|
||||
namespace brightray {
|
||||
|
||||
NotificationDelegateAdapter::NotificationDelegateAdapter(
|
||||
scoped_ptr<content::DesktopNotificationDelegate> delegate)
|
||||
: delegate_(delegate.Pass()) {
|
||||
}
|
||||
|
||||
NotificationDelegateAdapter::~NotificationDelegateAdapter() {
|
||||
}
|
||||
|
||||
void NotificationDelegateAdapter::NotificationDestroyed() {
|
||||
delete this;
|
||||
}
|
||||
|
||||
void NotificationDelegateAdapter::NotificationDisplayed() {
|
||||
delegate_->NotificationDisplayed();
|
||||
}
|
||||
|
||||
void NotificationDelegateAdapter::NotificationClosed() {
|
||||
delegate_->NotificationClosed();
|
||||
}
|
||||
|
||||
void NotificationDelegateAdapter::NotificationClick() {
|
||||
delegate_->NotificationClick();
|
||||
}
|
||||
|
||||
} // namespace brightray
|
Loading…
Add table
Add a link
Reference in a new issue