Add support for notification actions on macOS
This commit is contained in:
parent
873a315538
commit
4f0d48f164
16 changed files with 136 additions and 13 deletions
|
@ -6,6 +6,7 @@
|
|||
#define BRIGHTRAY_BROWSER_NOTIFICATION_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
|
@ -18,6 +19,11 @@ namespace brightray {
|
|||
class NotificationDelegate;
|
||||
class NotificationPresenter;
|
||||
|
||||
struct NotificationAction {
|
||||
base::string16 type;
|
||||
base::string16 label;
|
||||
};
|
||||
|
||||
class Notification {
|
||||
public:
|
||||
virtual ~Notification();
|
||||
|
@ -30,7 +36,8 @@ class Notification {
|
|||
const SkBitmap& icon,
|
||||
bool silent,
|
||||
bool has_reply,
|
||||
const base::string16& reply_placeholder) = 0;
|
||||
const base::string16& reply_placeholder,
|
||||
const std::vector<NotificationAction> actions) = 0;
|
||||
// Closes the notification, this instance will be destroyed after the
|
||||
// notification gets closed.
|
||||
virtual void Dismiss() = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue