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

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

Issue 1864053002: Implement Android UI of web notification inline replies Base URL: https://chromium.googlesource.com/chromium/src.git@inline_replies_ps1
Patch Set: Fix filename? Created 4 years, 8 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
« chromium.gyp_env ('K') | « 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
11 namespace message_center { 11 namespace message_center {
12 12
13 namespace { 13 namespace {
14 14
15 unsigned g_next_serial_number_ = 0; 15 unsigned g_next_serial_number_ = 0;
16 16
17 } // namespace 17 } // namespace
18 18
19 NotificationItem::NotificationItem(const base::string16& title, 19 NotificationItem::NotificationItem(const base::string16& title,
20 const base::string16& message) 20 const base::string16& message)
21 : title(title), 21 : title(title),
22 message(message) { 22 message(message) {
23 } 23 }
24 24
25 ButtonInfo::ButtonInfo(const base::string16& title) 25 ButtonInfo::ButtonInfo(const base::string16& title)
26 : title(title) { 26 : type(BUTTON_INFO_TYPE_BUTTON), title(title) {}
27 }
28 27
29 RichNotificationData::RichNotificationData() 28 RichNotificationData::RichNotificationData()
30 : priority(DEFAULT_PRIORITY), 29 : priority(DEFAULT_PRIORITY),
31 never_timeout(false), 30 never_timeout(false),
32 timestamp(base::Time::Now()), 31 timestamp(base::Time::Now()),
33 context_message(base::string16()), 32 context_message(base::string16()),
34 progress(0), 33 progress(0),
35 should_make_spoken_feedback_for_popup_updates(true), 34 should_make_spoken_feedback_for_popup_updates(true),
36 clickable(true), 35 clickable(true),
37 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 NOTIFICATION_TYPE_SIMPLE, notification_id, title, message, icon, 179 NOTIFICATION_TYPE_SIMPLE, notification_id, title, message, icon,
181 base::string16() /* display_source */, GURL(), 180 base::string16() /* display_source */, GURL(),
182 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id), 181 NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id),
183 RichNotificationData(), 182 RichNotificationData(),
184 new HandleNotificationClickedDelegate(click_callback))); 183 new HandleNotificationClickedDelegate(click_callback)));
185 notification->SetSystemPriority(); 184 notification->SetSystemPriority();
186 return notification; 185 return notification;
187 } 186 }
188 187
189 } // namespace message_center 188 } // namespace message_center
OLDNEW
« chromium.gyp_env ('K') | « ui/message_center/notification.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698