electron/shell/browser/notifications/linux/libnotify_notification.h
electron-roller[bot] 8f7a48879e
chore: bump chromium to 119.0.6045.0 (main) (#40076)
* chore: bump chromium in DEPS to 119.0.6045.0

* chore: update patches

* 4864948: Remove legacy-legacy

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4864948

* 4907760: Remove ui/base/glib/glib_signal.h

https://chromium-review.googlesource.com/c/chromium/src/+/4907760

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-05 19:59:39 -04:00

40 lines
1.3 KiB
C++

// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
#include "base/memory/raw_ptr_exclusion.h"
#include "library_loaders/libnotify_loader.h"
#include "shell/browser/notifications/notification.h"
#include "ui/base/glib/scoped_gsignal.h"
namespace electron {
class LibnotifyNotification : public Notification {
public:
LibnotifyNotification(NotificationDelegate* delegate,
NotificationPresenter* presenter);
~LibnotifyNotification() override;
static bool Initialize();
// Notification:
void Show(const NotificationOptions& options) override;
void Dismiss() override;
private:
void OnNotificationClosed(NotifyNotification* notification);
static void OnNotificationView(NotifyNotification* notification,
char* action,
gpointer user_data);
RAW_PTR_EXCLUSION NotifyNotification* notification_ = nullptr;
ScopedGSignal signal_;
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_