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

Unified Diff: content/public/common/platform_notification_data.h

Issue 1094553002: Revert "Speculative revert by sheriff" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/public/common/platform_notification_data.h
diff --git a/content/public/common/platform_notification_data.h b/content/public/common/platform_notification_data.h
index f6c999d82be080941bdcfdcc79322b6b282ce70e..5b608c0d3b2b5d668b2978a1461743be45e3b39c 100644
--- a/content/public/common/platform_notification_data.h
+++ b/content/public/common/platform_notification_data.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
#include <string>
+#include <vector>
#include "base/strings/string16.h"
#include "content/common/content_export.h"
@@ -20,6 +21,10 @@ struct CONTENT_EXPORT PlatformNotificationData {
PlatformNotificationData();
~PlatformNotificationData();
+ // The maximum size of developer-provided data to be stored in the |data|
+ // property of this structure.
+ static const size_t kMaximumDeveloperDataSize = 1024 * 1024;
+
enum NotificationDirection {
NotificationDirectionLeftToRight,
NotificationDirectionRightToLeft,
@@ -31,7 +36,7 @@ struct CONTENT_EXPORT PlatformNotificationData {
base::string16 title;
// Hint to determine the directionality of the displayed notification.
- NotificationDirection direction;
+ NotificationDirection direction = NotificationDirectionLeftToRight;
// BCP 47 language tag describing the notification's contents. Optional.
std::string lang;
@@ -48,7 +53,11 @@ struct CONTENT_EXPORT PlatformNotificationData {
// Whether default notification indicators (sound, vibration, light) should
// be suppressed.
- bool silent;
+ bool silent = false;
+
+ // Developer-provided data associated with the notification, in the form of
+ // a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
+ std::vector<char> data;
};
} // namespace content
« no previous file with comments | « content/common/platform_notification_messages.h ('k') | content/public/common/platform_notification_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698