mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
🎨 Make Notification getters const methods
This commit is contained in:
@@ -85,30 +85,34 @@ mate::WrappableBase* Notification::New(mate::Arguments* args) {
|
||||
}
|
||||
|
||||
// Getters
|
||||
base::string16 Notification::GetTitle() {
|
||||
base::string16 Notification::GetTitle() const {
|
||||
return title_;
|
||||
}
|
||||
|
||||
base::string16 Notification::GetSubtitle() {
|
||||
base::string16 Notification::GetSubtitle() const {
|
||||
return subtitle_;
|
||||
}
|
||||
|
||||
base::string16 Notification::GetBody() {
|
||||
base::string16 Notification::GetBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
bool Notification::GetSilent() {
|
||||
bool Notification::GetSilent() const {
|
||||
return silent_;
|
||||
}
|
||||
|
||||
base::string16 Notification::GetReplyPlaceholder() {
|
||||
base::string16 Notification::GetReplyPlaceholder() const {
|
||||
return reply_placeholder_;
|
||||
}
|
||||
|
||||
bool Notification::GetHasReply() {
|
||||
bool Notification::GetHasReply() const {
|
||||
return has_reply_;
|
||||
}
|
||||
|
||||
std::vector<brightray::NotificationAction> Notification::GetActions() const {
|
||||
return actions_;
|
||||
}
|
||||
|
||||
// Setters
|
||||
void Notification::SetTitle(const base::string16& new_title) {
|
||||
title_ = new_title;
|
||||
@@ -139,10 +143,6 @@ void Notification::SetActions(
|
||||
actions_ = actions;
|
||||
}
|
||||
|
||||
std::vector<brightray::NotificationAction> Notification::GetActions() {
|
||||
return actions_;
|
||||
}
|
||||
|
||||
void Notification::NotificationAction(int index) {
|
||||
Emit("action", index);
|
||||
}
|
||||
|
||||
@@ -47,13 +47,13 @@ class Notification : public mate::TrackableObject<Notification>,
|
||||
void Show();
|
||||
|
||||
// Prop Getters
|
||||
base::string16 GetTitle();
|
||||
base::string16 GetSubtitle();
|
||||
base::string16 GetBody();
|
||||
bool GetSilent();
|
||||
base::string16 GetReplyPlaceholder();
|
||||
bool GetHasReply();
|
||||
std::vector<brightray::NotificationAction> GetActions();
|
||||
base::string16 GetTitle() const;
|
||||
base::string16 GetSubtitle() const;
|
||||
base::string16 GetBody() const;
|
||||
bool GetSilent() const;
|
||||
base::string16 GetReplyPlaceholder() const;
|
||||
bool GetHasReply() const;
|
||||
std::vector<brightray::NotificationAction> GetActions() const;
|
||||
|
||||
// Prop Setters
|
||||
void SetTitle(const base::string16& new_title);
|
||||
|
||||
Reference in New Issue
Block a user