🎨 Make Notification getters const methods
This commit is contained in:
parent
a196bf97bc
commit
d5df114bb4
2 changed files with 17 additions and 17 deletions
|
@ -85,30 +85,34 @@ mate::WrappableBase* Notification::New(mate::Arguments* args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
base::string16 Notification::GetTitle() {
|
base::string16 Notification::GetTitle() const {
|
||||||
return title_;
|
return title_;
|
||||||
}
|
}
|
||||||
|
|
||||||
base::string16 Notification::GetSubtitle() {
|
base::string16 Notification::GetSubtitle() const {
|
||||||
return subtitle_;
|
return subtitle_;
|
||||||
}
|
}
|
||||||
|
|
||||||
base::string16 Notification::GetBody() {
|
base::string16 Notification::GetBody() const {
|
||||||
return body_;
|
return body_;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Notification::GetSilent() {
|
bool Notification::GetSilent() const {
|
||||||
return silent_;
|
return silent_;
|
||||||
}
|
}
|
||||||
|
|
||||||
base::string16 Notification::GetReplyPlaceholder() {
|
base::string16 Notification::GetReplyPlaceholder() const {
|
||||||
return reply_placeholder_;
|
return reply_placeholder_;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Notification::GetHasReply() {
|
bool Notification::GetHasReply() const {
|
||||||
return has_reply_;
|
return has_reply_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<brightray::NotificationAction> Notification::GetActions() const {
|
||||||
|
return actions_;
|
||||||
|
}
|
||||||
|
|
||||||
// Setters
|
// Setters
|
||||||
void Notification::SetTitle(const base::string16& new_title) {
|
void Notification::SetTitle(const base::string16& new_title) {
|
||||||
title_ = new_title;
|
title_ = new_title;
|
||||||
|
@ -139,10 +143,6 @@ void Notification::SetActions(
|
||||||
actions_ = actions;
|
actions_ = actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<brightray::NotificationAction> Notification::GetActions() {
|
|
||||||
return actions_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Notification::NotificationAction(int index) {
|
void Notification::NotificationAction(int index) {
|
||||||
Emit("action", index);
|
Emit("action", index);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,13 +47,13 @@ class Notification : public mate::TrackableObject<Notification>,
|
||||||
void Show();
|
void Show();
|
||||||
|
|
||||||
// Prop Getters
|
// Prop Getters
|
||||||
base::string16 GetTitle();
|
base::string16 GetTitle() const;
|
||||||
base::string16 GetSubtitle();
|
base::string16 GetSubtitle() const;
|
||||||
base::string16 GetBody();
|
base::string16 GetBody() const;
|
||||||
bool GetSilent();
|
bool GetSilent() const;
|
||||||
base::string16 GetReplyPlaceholder();
|
base::string16 GetReplyPlaceholder() const;
|
||||||
bool GetHasReply();
|
bool GetHasReply() const;
|
||||||
std::vector<brightray::NotificationAction> GetActions();
|
std::vector<brightray::NotificationAction> GetActions() const;
|
||||||
|
|
||||||
// Prop Setters
|
// Prop Setters
|
||||||
void SetTitle(const base::string16& new_title);
|
void SetTitle(const base::string16& new_title);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue