Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_ | 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ | 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/strings/nullable_string16.h" | |
| 13 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 15 #include "base/values.h" | 16 #include "base/values.h" |
| 16 #include "ui/gfx/image/image.h" | 17 #include "ui/gfx/image/image.h" |
| 17 #include "ui/message_center/message_center_export.h" | 18 #include "ui/message_center/message_center_export.h" |
| 18 #include "ui/message_center/notification_delegate.h" | 19 #include "ui/message_center/notification_delegate.h" |
| 19 #include "ui/message_center/notification_types.h" | 20 #include "ui/message_center/notification_types.h" |
| 20 #include "ui/message_center/notifier_settings.h" | 21 #include "ui/message_center/notifier_settings.h" |
| 21 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 22 | 23 |
| 23 namespace message_center { | 24 namespace message_center { |
| 24 | 25 |
| 25 struct MESSAGE_CENTER_EXPORT NotificationItem { | 26 struct MESSAGE_CENTER_EXPORT NotificationItem { |
| 26 base::string16 title; | 27 base::string16 title; |
| 27 base::string16 message; | 28 base::string16 message; |
| 28 | 29 |
| 29 NotificationItem(const base::string16& title, const base::string16& message); | 30 NotificationItem(const base::string16& title, const base::string16& message); |
| 30 }; | 31 }; |
| 31 | 32 |
| 33 enum class ButtonType { BUTTON, TEXT }; | |
| 34 | |
| 32 struct MESSAGE_CENTER_EXPORT ButtonInfo { | 35 struct MESSAGE_CENTER_EXPORT ButtonInfo { |
|
Peter Beverloo
2016/09/23 16:01:22
See my earlier comment about the rule of three, si
awdf
2016/09/26 15:33:29
Done.
| |
| 33 base::string16 title; | 36 base::string16 title; |
| 34 gfx::Image icon; | 37 gfx::Image icon; |
| 38 ButtonType type = ButtonType::BUTTON; | |
| 39 base::NullableString16 placeholder; | |
| 35 | 40 |
| 36 ButtonInfo(const base::string16& title); | 41 ButtonInfo(const base::string16& title); |
| 37 }; | 42 }; |
| 38 | 43 |
| 39 class MESSAGE_CENTER_EXPORT RichNotificationData { | 44 class MESSAGE_CENTER_EXPORT RichNotificationData { |
| 40 public: | 45 public: |
| 41 RichNotificationData(); | 46 RichNotificationData(); |
| 42 RichNotificationData(const RichNotificationData& other); | 47 RichNotificationData(const RichNotificationData& other); |
| 43 ~RichNotificationData(); | 48 ~RichNotificationData(); |
| 44 | 49 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 bool is_read_; // True if this has been seen in the message center. | 290 bool is_read_; // True if this has been seen in the message center. |
| 286 | 291 |
| 287 // A proxy object that allows access back to the JavaScript object that | 292 // A proxy object that allows access back to the JavaScript object that |
| 288 // represents the notification, for firing events. | 293 // represents the notification, for firing events. |
| 289 scoped_refptr<NotificationDelegate> delegate_; | 294 scoped_refptr<NotificationDelegate> delegate_; |
| 290 }; | 295 }; |
| 291 | 296 |
| 292 } // namespace message_center | 297 } // namespace message_center |
| 293 | 298 |
| 294 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 299 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| OLD | NEW |