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

Unified Diff: ui/message_center/notification.h

Issue 1395483002: Increase Web Notification timeout to 20 seconds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use constant for delay Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/message_center_style.cc ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification.h
diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h
index 3b63e54eb47a207570a7d3b78888784406b69d86..41dfa2149443ca5c0d012a1c722a4335f0585dfd 100644
--- a/ui/message_center/notification.h
+++ b/ui/message_center/notification.h
@@ -41,6 +41,7 @@ class MESSAGE_CENTER_EXPORT RichNotificationData {
~RichNotificationData();
int priority;
+ bool is_web_notification;
bool never_timeout;
base::Time timestamp;
base::string16 context_message;
@@ -75,7 +76,7 @@ class MESSAGE_CENTER_EXPORT Notification {
virtual ~Notification();
// Copies the internal on-memory state from |base|, i.e. shown_as_popup,
- // is_read, and never_timeout.
+ // is_read, is_web_notification and never_timeout.
void CopyState(Notification* base);
NotificationType type() const { return type_; }
@@ -193,13 +194,19 @@ class MESSAGE_CENTER_EXPORT Notification {
// The notification with lesser serial_number is considered 'older'.
unsigned serial_number() { return serial_number_; }
- // Marks this explicitly to prevent the timeout dismiss of notification.
- // This is used by webkit notifications to keep the existing behavior.
- void set_never_timeout(bool never_timeout) {
- optional_fields_.never_timeout = never_timeout;
+ // Gets and sets whether this was shown using the Web Notifications API.
+ bool is_web_notification() const {
+ return optional_fields_.is_web_notification;
+ }
+ void set_is_web_notification(bool is_web_notification) {
+ optional_fields_.is_web_notification = is_web_notification;
Peter Beverloo 2015/10/08 07:23:06 why can't we use notifier_id_type==NotifierId::WEB
}
+ // Gets and sets whether the notifiction should remain onscreen permanently.
bool never_timeout() const { return optional_fields_.never_timeout; }
+ void set_never_timeout(bool never_timeout) {
+ optional_fields_.never_timeout = never_timeout;
+ }
bool clickable() const { return optional_fields_.clickable; }
void set_clickable(bool clickable) {
« no previous file with comments | « ui/message_center/message_center_style.cc ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698