🎨 Make Notification getters const methods

This commit is contained in:
Milan Burda 2017-06-30 16:04:59 +02:00
parent a196bf97bc
commit d5df114bb4
2 changed files with 17 additions and 17 deletions

View file

@ -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);
}

View file

@ -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);