| 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 12 matching lines...) Expand all Loading... |
| 23 ButtonInfo::ButtonInfo(const base::string16& title) | 23 ButtonInfo::ButtonInfo(const base::string16& title) |
| 24 : title(title) { | 24 : title(title) { |
| 25 } | 25 } |
| 26 | 26 |
| 27 RichNotificationData::RichNotificationData() | 27 RichNotificationData::RichNotificationData() |
| 28 : priority(DEFAULT_PRIORITY), | 28 : priority(DEFAULT_PRIORITY), |
| 29 never_timeout(false), | 29 never_timeout(false), |
| 30 timestamp(base::Time::Now()), | 30 timestamp(base::Time::Now()), |
| 31 progress(0), | 31 progress(0), |
| 32 should_make_spoken_feedback_for_popup_updates(true), | 32 should_make_spoken_feedback_for_popup_updates(true), |
| 33 clickable(true) {} | 33 clickable(true), |
| 34 silent(false) {} |
| 34 | 35 |
| 35 RichNotificationData::RichNotificationData(const RichNotificationData& other) | 36 RichNotificationData::RichNotificationData(const RichNotificationData& other) |
| 36 : priority(other.priority), | 37 : priority(other.priority), |
| 37 never_timeout(other.never_timeout), | 38 never_timeout(other.never_timeout), |
| 38 timestamp(other.timestamp), | 39 timestamp(other.timestamp), |
| 39 context_message(other.context_message), | 40 context_message(other.context_message), |
| 40 image(other.image), | 41 image(other.image), |
| 41 small_image(other.small_image), | 42 small_image(other.small_image), |
| 42 items(other.items), | 43 items(other.items), |
| 43 progress(other.progress), | 44 progress(other.progress), |
| 44 buttons(other.buttons), | 45 buttons(other.buttons), |
| 45 should_make_spoken_feedback_for_popup_updates( | 46 should_make_spoken_feedback_for_popup_updates( |
| 46 other.should_make_spoken_feedback_for_popup_updates), | 47 other.should_make_spoken_feedback_for_popup_updates), |
| 47 clickable(other.clickable) {} | 48 clickable(other.clickable), |
| 49 silent(other.silent) {} |
| 48 | 50 |
| 49 RichNotificationData::~RichNotificationData() {} | 51 RichNotificationData::~RichNotificationData() {} |
| 50 | 52 |
| 51 Notification::Notification(NotificationType type, | 53 Notification::Notification(NotificationType type, |
| 52 const std::string& id, | 54 const std::string& id, |
| 53 const base::string16& title, | 55 const base::string16& title, |
| 54 const base::string16& message, | 56 const base::string16& message, |
| 55 const gfx::Image& icon, | 57 const gfx::Image& icon, |
| 56 const base::string16& display_source, | 58 const base::string16& display_source, |
| 57 const NotifierId& notifier_id, | 59 const NotifierId& notifier_id, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 icon, | 160 icon, |
| 159 base::string16() /* display_source */, | 161 base::string16() /* display_source */, |
| 160 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), | 162 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), |
| 161 RichNotificationData(), | 163 RichNotificationData(), |
| 162 new HandleNotificationClickedDelegate(click_callback))); | 164 new HandleNotificationClickedDelegate(click_callback))); |
| 163 notification->SetSystemPriority(); | 165 notification->SetSystemPriority(); |
| 164 return notification.Pass(); | 166 return notification.Pass(); |
| 165 } | 167 } |
| 166 | 168 |
| 167 } // namespace message_center | 169 } // namespace message_center |
| OLD | NEW |