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" | |
|
dewittj
2016/09/28 02:41:58
unused?
awdf
2016/09/28 11:42:09
Done, thanks.
Is there an automated tool I can us
Peter Beverloo
2016/09/28 12:00:40
Unfortunately there isn't. (This is a hard problem
| |
| 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 { |
| 33 base::string16 title; | 36 base::string16 title; |
| 34 gfx::Image icon; | 37 gfx::Image icon; |
| 38 ButtonType type = ButtonType::BUTTON; | |
| 39 base::string16 placeholder; | |
| 35 | 40 |
| 36 ButtonInfo(const base::string16& title); | 41 explicit ButtonInfo(const base::string16& title); |
| 42 ButtonInfo(const ButtonInfo& other); | |
| 43 ~ButtonInfo(); | |
| 44 ButtonInfo& operator=(const ButtonInfo& other); | |
|
dewittj
2016/09/28 02:41:58
any reason not to put =default here instead of .cc
awdf
2016/09/28 11:42:09
Nope, other than I didn't know you could (and I w
Peter Beverloo
2016/09/28 12:00:40
Well, by moving =default to the header file you're
| |
| 37 }; | 45 }; |
| 38 | 46 |
| 39 class MESSAGE_CENTER_EXPORT RichNotificationData { | 47 class MESSAGE_CENTER_EXPORT RichNotificationData { |
| 40 public: | 48 public: |
| 41 RichNotificationData(); | 49 RichNotificationData(); |
| 42 RichNotificationData(const RichNotificationData& other); | 50 RichNotificationData(const RichNotificationData& other); |
| 43 ~RichNotificationData(); | 51 ~RichNotificationData(); |
| 44 | 52 |
| 45 int priority; | 53 int priority; |
| 46 bool never_timeout; | 54 bool never_timeout; |
| (...skipping 238 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. | 293 bool is_read_; // True if this has been seen in the message center. |
| 286 | 294 |
| 287 // A proxy object that allows access back to the JavaScript object that | 295 // A proxy object that allows access back to the JavaScript object that |
| 288 // represents the notification, for firing events. | 296 // represents the notification, for firing events. |
| 289 scoped_refptr<NotificationDelegate> delegate_; | 297 scoped_refptr<NotificationDelegate> delegate_; |
| 290 }; | 298 }; |
| 291 | 299 |
| 292 } // namespace message_center | 300 } // namespace message_center |
| 293 | 301 |
| 294 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 302 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| OLD | NEW |