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

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

Issue 1267673003: Plumb Blink notification actions to button UI on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix size_t Created 5 years, 4 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 | « content/content_common.gypi ('k') | content/public/common/platform_notification_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40bd98d0873aab72df91fb7682101fcc6ad6bfd2..10516cfe1e7e118cf929ef9a1fb80239e316f600 100644
--- a/content/public/common/platform_notification_data.h
+++ b/content/public/common/platform_notification_data.h
@@ -14,6 +14,18 @@
namespace content {
+// A notification action (button); corresponds to Blink WebNotificationAction.
+struct CONTENT_EXPORT PlatformNotificationAction {
+ PlatformNotificationAction();
+ ~PlatformNotificationAction();
+
+ // Action name that the author can use to distinguish them.
+ std::string action;
+
+ // Title of the button.
+ base::string16 title;
+};
+
// Structure representing the information associated with a Web Notification.
// This struct should include the developer-visible information, kept
// synchronized with the WebNotificationData structure defined in the Blink API.
@@ -62,6 +74,9 @@ struct CONTENT_EXPORT PlatformNotificationData {
// Developer-provided data associated with the notification, in the form of
// a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
std::vector<char> data;
+
+ // Actions that should be shown as buttons on the notification.
+ std::vector<PlatformNotificationAction> actions;
};
} // namespace content
« no previous file with comments | « content/content_common.gypi ('k') | content/public/common/platform_notification_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698