diff --git a/atom/browser/api/atom_api_notification.cc b/atom/browser/api/atom_api_notification.cc index b4e94d377b29..daa46b96cbfd 100644 --- a/atom/browser/api/atom_api_notification.cc +++ b/atom/browser/api/atom_api_notification.cc @@ -105,22 +105,22 @@ bool Notification::GetSilent() const { return silent_; } -base::string16 Notification::GetReplyPlaceholder() const { - return reply_placeholder_; -} - bool Notification::GetHasReply() const { return has_reply_; } -std::vector Notification::GetActions() const { - return actions_; +base::string16 Notification::GetReplyPlaceholder() const { + return reply_placeholder_; } base::string16 Notification::GetSound() const { return sound_; } +std::vector Notification::GetActions() const { + return actions_; +} + base::string16 Notification::GetCloseButtonText() const { return close_button_text_; } @@ -142,12 +142,16 @@ void Notification::SetSilent(bool new_silent) { silent_ = new_silent; } +void Notification::SetHasReply(bool new_has_reply) { + has_reply_ = new_has_reply; +} + void Notification::SetReplyPlaceholder(const base::string16& new_placeholder) { reply_placeholder_ = new_placeholder; } -void Notification::SetHasReply(bool new_has_reply) { - has_reply_ = new_has_reply; +void Notification::SetSound(const base::string16& new_sound) { + sound_ = new_sound; } void Notification::SetActions( @@ -155,10 +159,6 @@ void Notification::SetActions( actions_ = actions; } -void Notification::SetSound(const base::string16& new_sound) { - sound_ = new_sound; -} - void Notification::SetCloseButtonText(const base::string16& text) { close_button_text_ = text; } @@ -232,15 +232,16 @@ void Notification::BuildPrototype(v8::Isolate* isolate, .SetProperty("subtitle", &Notification::GetSubtitle, &Notification::SetSubtitle) .SetProperty("body", &Notification::GetBody, &Notification::SetBody) - .SetProperty("silent", &Notification::GetSilent, &Notification::SetSilent) - .SetProperty("replyPlaceholder", &Notification::GetReplyPlaceholder, - &Notification::SetReplyPlaceholder) + .SetProperty("silent", &Notification::GetSilent, + &Notification::SetSilent) .SetProperty("hasReply", &Notification::GetHasReply, &Notification::SetHasReply) - .SetProperty("actions", &Notification::GetActions, - &Notification::SetActions) + .SetProperty("replyPlaceholder", &Notification::GetReplyPlaceholder, + &Notification::SetReplyPlaceholder) .SetProperty("sound", &Notification::GetSound, &Notification::SetSound) + .SetProperty("actions", &Notification::GetActions, + &Notification::SetActions) .SetProperty("closeButtonText", &Notification::GetCloseButtonText, &Notification::SetCloseButtonText); } diff --git a/atom/browser/api/atom_api_notification.h b/atom/browser/api/atom_api_notification.h index e8e7a246e840..91a5b72c983c 100644 --- a/atom/browser/api/atom_api_notification.h +++ b/atom/browser/api/atom_api_notification.h @@ -52,10 +52,10 @@ class Notification : public mate::TrackableObject, base::string16 GetSubtitle() const; base::string16 GetBody() const; bool GetSilent() const; - base::string16 GetReplyPlaceholder() const; bool GetHasReply() const; - std::vector GetActions() const; + base::string16 GetReplyPlaceholder() const; base::string16 GetSound() const; + std::vector GetActions() const; base::string16 GetCloseButtonText() const; // Prop Setters @@ -63,10 +63,10 @@ class Notification : public mate::TrackableObject, void SetSubtitle(const base::string16& new_subtitle); void SetBody(const base::string16& new_body); void SetSilent(bool new_silent); - void SetReplyPlaceholder(const base::string16& new_reply_placeholder); void SetHasReply(bool new_has_reply); - void SetActions(const std::vector& actions); + void SetReplyPlaceholder(const base::string16& new_reply_placeholder); void SetSound(const base::string16& sound); + void SetActions(const std::vector& actions); void SetCloseButtonText(const base::string16& text); private: @@ -77,10 +77,10 @@ class Notification : public mate::TrackableObject, base::string16 icon_path_; bool has_icon_ = false; bool silent_ = false; - base::string16 reply_placeholder_; bool has_reply_ = false; - std::vector actions_; + base::string16 reply_placeholder_; base::string16 sound_; + std::vector actions_; base::string16 close_button_text_; brightray::NotificationPresenter* presenter_; diff --git a/brightray/browser/notification.h b/brightray/browser/notification.h index 853888f1cc8e..1b81dda5a182 100644 --- a/brightray/browser/notification.h +++ b/brightray/browser/notification.h @@ -28,9 +28,9 @@ struct NotificationOptions { base::string16 subtitle; base::string16 msg; std::string tag; + bool silent; GURL icon_url; SkBitmap icon; - bool silent; bool has_reply; base::string16 reply_placeholder; base::string16 sound;