Fix building on Linux
This commit is contained in:
parent
9e12036823
commit
6d62b0960e
2 changed files with 5 additions and 3 deletions
|
@ -52,13 +52,15 @@ NotificationPresenterLinux::~NotificationPresenterLinux() {
|
|||
|
||||
void NotificationPresenterLinux::ShowNotification(
|
||||
const content::ShowDesktopNotificationHostMsgParams& params,
|
||||
content::DesktopNotificationDelegate* delegate,
|
||||
scoped_ptr<content::DesktopNotificationDelegate> delegate_ptr,
|
||||
base::Closure* cancel_callback) {
|
||||
std::string title = base::UTF16ToUTF8(params.title);
|
||||
std::string body = base::UTF16ToUTF8(params.body);
|
||||
NotifyNotification* notification = notify_notification_new(title.c_str(), body.c_str(), nullptr);
|
||||
|
||||
g_object_set_data(G_OBJECT(notification), "delegate", delegate);
|
||||
content::DesktopNotificationDelegate* delegate = delegate_ptr.release();
|
||||
|
||||
g_object_set_data_full(G_OBJECT(notification), "delegate", delegate, operator delete);
|
||||
g_signal_connect(notification, "closed", G_CALLBACK(OnNotificationClosedThunk), this);
|
||||
notify_notification_add_action(notification, "default", "View", OnNotificationViewThunk, this,
|
||||
nullptr);
|
||||
|
|
|
@ -27,7 +27,7 @@ class NotificationPresenterLinux : public NotificationPresenter {
|
|||
// NotificationPresenter:
|
||||
virtual void ShowNotification(
|
||||
const content::ShowDesktopNotificationHostMsgParams&,
|
||||
content::DesktopNotificationDelegate* delegate,
|
||||
scoped_ptr<content::DesktopNotificationDelegate> delegate,
|
||||
base::Closure* cancel_callback) OVERRIDE;
|
||||
|
||||
void CancelNotification(NotifyNotification* notification);
|
||||
|
|
Loading…
Reference in a new issue