| 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 #include "ui/message_center/notification.h" | 5 #include "ui/message_center/notification.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/message_center/notification_delegate.h" | 8 #include "ui/message_center/notification_delegate.h" |
| 9 #include "ui/message_center/notification_types.h" | 9 #include "ui/message_center/notification_types.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 RichNotificationData::RichNotificationData() | 29 RichNotificationData::RichNotificationData() |
| 30 : priority(DEFAULT_PRIORITY), | 30 : priority(DEFAULT_PRIORITY), |
| 31 never_timeout(false), | 31 never_timeout(false), |
| 32 timestamp(base::Time::Now()), | 32 timestamp(base::Time::Now()), |
| 33 context_message(base::string16()), | 33 context_message(base::string16()), |
| 34 progress(0), | 34 progress(0), |
| 35 should_make_spoken_feedback_for_popup_updates(true), | 35 should_make_spoken_feedback_for_popup_updates(true), |
| 36 clickable(true), | 36 clickable(true), |
| 37 #if defined(OS_CHROMEOS) |
| 38 pinned(false), |
| 39 #endif // defined(OS_CHROMEOS) |
| 37 renotify(false), | 40 renotify(false), |
| 38 silent(false) {} | 41 silent(false) {} |
| 39 | 42 |
| 40 RichNotificationData::RichNotificationData(const RichNotificationData& other) | 43 RichNotificationData::RichNotificationData(const RichNotificationData& other) |
| 41 : priority(other.priority), | 44 : priority(other.priority), |
| 42 never_timeout(other.never_timeout), | 45 never_timeout(other.never_timeout), |
| 43 timestamp(other.timestamp), | 46 timestamp(other.timestamp), |
| 44 context_message(other.context_message), | 47 context_message(other.context_message), |
| 45 image(other.image), | 48 image(other.image), |
| 46 small_image(other.small_image), | 49 small_image(other.small_image), |
| 47 items(other.items), | 50 items(other.items), |
| 48 progress(other.progress), | 51 progress(other.progress), |
| 49 buttons(other.buttons), | 52 buttons(other.buttons), |
| 50 should_make_spoken_feedback_for_popup_updates( | 53 should_make_spoken_feedback_for_popup_updates( |
| 51 other.should_make_spoken_feedback_for_popup_updates), | 54 other.should_make_spoken_feedback_for_popup_updates), |
| 52 clickable(other.clickable), | 55 clickable(other.clickable), |
| 56 #if defined(OS_CHROMEOS) |
| 57 pinned(other.pinned), |
| 58 #endif // defined(OS_CHROMEOS) |
| 53 vibration_pattern(other.vibration_pattern), | 59 vibration_pattern(other.vibration_pattern), |
| 54 renotify(other.renotify), | 60 renotify(other.renotify), |
| 55 silent(other.silent) {} | 61 silent(other.silent) {} |
| 56 | 62 |
| 57 RichNotificationData::~RichNotificationData() {} | 63 RichNotificationData::~RichNotificationData() {} |
| 58 | 64 |
| 59 Notification::Notification(NotificationType type, | 65 Notification::Notification(NotificationType type, |
| 60 const std::string& id, | 66 const std::string& id, |
| 61 const base::string16& title, | 67 const base::string16& title, |
| 62 const base::string16& message, | 68 const base::string16& message, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 NOTIFICATION_TYPE_SIMPLE, notification_id, title, message, icon, | 180 NOTIFICATION_TYPE_SIMPLE, notification_id, title, message, icon, |
| 175 base::string16() /* display_source */, GURL(), | 181 base::string16() /* display_source */, GURL(), |
| 176 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), | 182 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), |
| 177 RichNotificationData(), | 183 RichNotificationData(), |
| 178 new HandleNotificationClickedDelegate(click_callback))); | 184 new HandleNotificationClickedDelegate(click_callback))); |
| 179 notification->SetSystemPriority(); | 185 notification->SetSystemPriority(); |
| 180 return notification; | 186 return notification; |
| 181 } | 187 } |
| 182 | 188 |
| 183 } // namespace message_center | 189 } // namespace message_center |
| OLD | NEW |