OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/notifications/notification.h" | 5 #include "chrome/browser/notifications/notification.h" |
6 | 6 |
7 Notification::Notification(const GURL& origin_url, | |
8 const base::string16& title, | |
9 const base::string16& body, | |
10 const gfx::Image& icon, | |
11 const base::string16& display_source, | |
12 const std::string& tag, | |
13 NotificationDelegate* delegate) | |
14 : message_center::Notification(message_center::NOTIFICATION_TYPE_SIMPLE, | |
15 delegate->id(), | |
16 title, | |
17 body, | |
18 icon, | |
19 display_source, | |
20 origin_url, | |
21 message_center::NotifierId(origin_url), | |
22 message_center::RichNotificationData(), | |
23 delegate), | |
24 tag_(tag), | |
25 delegate_(delegate) {} | |
26 | |
27 Notification::Notification( | 7 Notification::Notification( |
28 message_center::NotificationType type, | 8 message_center::NotificationType type, |
29 const base::string16& title, | 9 const base::string16& title, |
30 const base::string16& body, | 10 const base::string16& body, |
31 const gfx::Image& icon, | 11 const gfx::Image& icon, |
32 const message_center::NotifierId& notifier_id, | 12 const message_center::NotifierId& notifier_id, |
33 const base::string16& display_source, | 13 const base::string16& display_source, |
34 const GURL& origin_url, | 14 const GURL& origin_url, |
35 const std::string& tag, | 15 const std::string& tag, |
36 const message_center::RichNotificationData& rich_notification_data, | 16 const message_center::RichNotificationData& rich_notification_data, |
(...skipping 24 matching lines...) Expand all Loading... |
61 delegate_(notification.delegate()) {} | 41 delegate_(notification.delegate()) {} |
62 | 42 |
63 Notification::~Notification() {} | 43 Notification::~Notification() {} |
64 | 44 |
65 Notification& Notification::operator=(const Notification& notification) { | 45 Notification& Notification::operator=(const Notification& notification) { |
66 message_center::Notification::operator=(notification); | 46 message_center::Notification::operator=(notification); |
67 tag_ = notification.tag(); | 47 tag_ = notification.tag(); |
68 delegate_ = notification.delegate(); | 48 delegate_ = notification.delegate(); |
69 return *this; | 49 return *this; |
70 } | 50 } |
OLD | NEW |