Chromium Code Reviews| Index: ui/message_center/notification.h |
| diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h |
| index 122cd6760629823e67d51cc789869a27269cad54..489255e0d95ee59bf88ae4f2b5511559b1ecae7f 100644 |
| --- a/ui/message_center/notification.h |
| +++ b/ui/message_center/notification.h |
| @@ -33,6 +33,13 @@ struct MESSAGE_CENTER_EXPORT ButtonInfo { |
| ButtonInfo(const base::string16& title); |
| }; |
| +struct MESSAGE_CENTER_EXPORT ContextMessage { |
|
Jun Mukai
2015/08/14 17:17:07
I prefer to keep string16 for context message. Cou
Miguel Garcia
2015/08/14 18:28:45
Will give a shot, now that you mention it I recall
Jun Mukai
2015/08/17 18:36:14
string16 is the text representation on UI side, so
|
| + ContextMessage(std::string msg, bool origin) |
| + : message(msg), is_origin(origin) {} |
| + std::string message; |
| + bool is_origin; |
| +}; |
| + |
| class MESSAGE_CENTER_EXPORT RichNotificationData { |
| public: |
| RichNotificationData(); |
| @@ -42,7 +49,7 @@ class MESSAGE_CENTER_EXPORT RichNotificationData { |
| int priority; |
| bool never_timeout; |
| base::Time timestamp; |
| - base::string16 context_message; |
| + ContextMessage context_message; |
| gfx::Image image; |
| gfx::Image small_image; |
| std::vector<NotificationItem> items; |
| @@ -123,11 +130,13 @@ class MESSAGE_CENTER_EXPORT Notification { |
| optional_fields_.timestamp = timestamp; |
| } |
| - const base::string16& context_message() const { |
| + const ContextMessage context_message() const { |
| return optional_fields_.context_message; |
| } |
| - void set_context_message(const base::string16& context_message) { |
| - optional_fields_.context_message = context_message; |
| + |
| + void set_context_message(const std::string& context_message, bool is_origin) { |
| + optional_fields_.context_message.message = context_message; |
| + optional_fields_.context_message.is_origin = is_origin; |
| } |
| const std::vector<NotificationItem>& items() const { |