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

Unified Diff: ui/message_center/notification.h

Issue 1645843003: Implement Non-Closable Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary property. Created 4 years, 10 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_impl_unittest.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 b9cf1298f1658f2ea5debbbb8f4ad7bf8cffe88d..1214ee29825edb7a60f06de9dc0ea3153d1ad183 100644
--- a/ui/message_center/notification.h
+++ b/ui/message_center/notification.h
@@ -53,6 +53,11 @@ class MESSAGE_CENTER_EXPORT RichNotificationData {
std::vector<ButtonInfo> buttons;
bool should_make_spoken_feedback_for_popup_updates;
bool clickable;
+#if defined(OS_CHROMEOS)
+ // Flag if the notification is pinned. If true, the notification is pinned
+ // and user can't remove it.
+ bool pinned;
+#endif // defined(OS_CHROMEOS)
std::vector<int> vibration_pattern;
bool renotify;
bool silent;
@@ -213,6 +218,17 @@ class MESSAGE_CENTER_EXPORT Notification {
optional_fields_.clickable = clickable;
}
+ bool pinned() const {
+#if defined(OS_CHROMEOS)
+ return optional_fields_.pinned;
+#else
+ return false;
+#endif // defined(OS_CHROMEOS)
+ }
+#if defined(OS_CHROMEOS)
+ void set_pinned(bool pinned) { optional_fields_.pinned = pinned; }
+#endif // defined(OS_CHROMEOS)
+
NotificationDelegate* delegate() const { return delegate_.get(); }
const RichNotificationData& rich_notification_data() const {
« no previous file with comments | « ui/message_center/message_center_impl_unittest.cc ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698