| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 message_(message), | 63 message_(message), |
| 64 icon_(icon), | 64 icon_(icon), |
| 65 display_source_(display_source), | 65 display_source_(display_source), |
| 66 notifier_id_(notifier_id), | 66 notifier_id_(notifier_id), |
| 67 serial_number_(g_next_serial_number_++), | 67 serial_number_(g_next_serial_number_++), |
| 68 optional_fields_(optional_fields), | 68 optional_fields_(optional_fields), |
| 69 shown_as_popup_(false), | 69 shown_as_popup_(false), |
| 70 is_read_(false), | 70 is_read_(false), |
| 71 delegate_(delegate) {} | 71 delegate_(delegate) {} |
| 72 | 72 |
| 73 Notification::Notification(const std::string& id, const Notification& other) |
| 74 : type_(other.type_), |
| 75 id_(id), |
| 76 title_(other.title_), |
| 77 message_(other.message_), |
| 78 icon_(other.icon_), |
| 79 display_source_(other.display_source_), |
| 80 notifier_id_(other.notifier_id_), |
| 81 serial_number_(other.serial_number_), |
| 82 optional_fields_(other.optional_fields_), |
| 83 shown_as_popup_(other.shown_as_popup_), |
| 84 is_read_(other.is_read_), |
| 85 delegate_(other.delegate_) { |
| 86 } |
| 87 |
| 73 Notification::Notification(const Notification& other) | 88 Notification::Notification(const Notification& other) |
| 74 : type_(other.type_), | 89 : type_(other.type_), |
| 75 id_(other.id_), | 90 id_(other.id_), |
| 76 title_(other.title_), | 91 title_(other.title_), |
| 77 message_(other.message_), | 92 message_(other.message_), |
| 78 icon_(other.icon_), | 93 icon_(other.icon_), |
| 79 display_source_(other.display_source_), | 94 display_source_(other.display_source_), |
| 80 notifier_id_(other.notifier_id_), | 95 notifier_id_(other.notifier_id_), |
| 81 serial_number_(other.serial_number_), | 96 serial_number_(other.serial_number_), |
| 82 optional_fields_(other.optional_fields_), | 97 optional_fields_(other.optional_fields_), |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 icon, | 158 icon, |
| 144 base::string16() /* display_source */, | 159 base::string16() /* display_source */, |
| 145 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), | 160 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), |
| 146 RichNotificationData(), | 161 RichNotificationData(), |
| 147 new HandleNotificationClickedDelegate(click_callback))); | 162 new HandleNotificationClickedDelegate(click_callback))); |
| 148 notification->SetSystemPriority(); | 163 notification->SetSystemPriority(); |
| 149 return notification.Pass(); | 164 return notification.Pass(); |
| 150 } | 165 } |
| 151 | 166 |
| 152 } // namespace message_center | 167 } // namespace message_center |
| OLD | NEW |