electron/shell/browser/notifications/mac/cocoa_notification.h
electron-roller[bot] c5b9f766f3
chore: bump chromium to 117.0.5923.0 (main) (#39304)
* chore: bump chromium in DEPS to 117.0.5921.0

* chore: update chromium patches

* 4721409: Remove redundant ARC configuration in /components | https://chromium-review.googlesource.com/c/chromium/src/+/4721409

* 4643750: Add V8_LOW_PRIORITY_TQ for main thread | https://chromium-review.googlesource.com/c/chromium/src/+/4643750

* 4022621: Re-register status item when owner of status watcher is changed | https://chromium-review.googlesource.com/c/chromium/src/+/4022621

* chore: update V8/boringssl patches

* fixup! 4643750: Add V8_LOW_PRIORITY_TQ for main thread | https://chromium-review.googlesource.com/c/chromium/src/+/4643750

* chore: bump chromium in DEPS to 117.0.5923.0

* build [debug]: remove assert
4722125: Update enterprise content analysis buildflags usage | https://chromium-review.googlesource.com/c/chromium/src/+/4722125

* chore: manually rollback to 117.0.5921.0

* build [arc]: ARC conversion in auto_updater

* build [arc]: ARC conversion in browser/api

* build [arc]: ARC conversion in notifications/mac

* build [arc]: ARC conversion in in_app_purchase

* build [arc]: ARC conversion in browser/ui

* build [arc]: ARC conversion in ui/cocoa

* build [arc]: ARC conversion in shell/common

* build [arc]: ARC conversion in OSR

* build [arc]: ARC conversion in login_helper

* build [arc]: ARC conversion in app_mas

* build [arc]: fix up ARC syntax (thanks @codebytere!)

* 4726946: [Extensions] Work around dangling BrowserContext pointer. | https://chromium-review.googlesource.com/c/chromium/src/+/4726946

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
2023-08-04 10:47:29 +02:00

45 lines
1.3 KiB
Objective-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_MAC_COCOA_NOTIFICATION_H_
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_
#import <Foundation/Foundation.h>
#include <map>
#include <string>
#include "shell/browser/notifications/notification.h"
namespace electron {
class CocoaNotification : public Notification {
public:
CocoaNotification(NotificationDelegate* delegate,
NotificationPresenter* presenter);
~CocoaNotification() override;
// Notification:
void Show(const NotificationOptions& options) override;
void Dismiss() override;
void NotificationDisplayed();
void NotificationReplied(const std::string& reply);
void NotificationActivated();
void NotificationActivated(NSUserNotificationAction* action);
void NotificationDismissed();
NSUserNotification* notification() const { return notification_; }
private:
void LogAction(const char* action);
NSUserNotification* __strong notification_;
std::map<std::string, unsigned> additional_action_indices_;
unsigned action_index_;
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_