Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: ui/message_center/notification.cc

Issue 965573002: Implement support for silent notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/message_center/notification.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/message_center/notification.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698