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

Unified Diff: third_party/WebKit/public/platform/modules/notifications/notification.mojom

Issue 1898193003: Add type converters from Mojo notifications to the content types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-permission-mojom
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/modules/notifications/notification.mojom
diff --git a/third_party/WebKit/public/platform/modules/notifications/notification.mojom b/third_party/WebKit/public/platform/modules/notifications/notification.mojom
index f82e322eb62c0d9c5f4f0b4b8c53853168199a97..38afa2b5e7509753a7786b1bac59bde787f2dff9 100644
--- a/third_party/WebKit/public/platform/modules/notifications/notification.mojom
+++ b/third_party/WebKit/public/platform/modules/notifications/notification.mojom
@@ -4,8 +4,17 @@
module blink.mojom;
+// The different types of actions that can be added to a Notification.
+enum NotificationActionType {
+ BUTTON,
+ TEXT
+};
+
// Structure representing an action button associated with a Notification.
struct NotificationAction {
+ // Type of action this structure represents.
+ NotificationActionType type;
+
// Action name that the author can use to distinguish them.
string action;
@@ -14,6 +23,9 @@ struct NotificationAction {
// URL of the icon for the button. May be empty if no url was specified.
string icon;
+
+ // Placeholder to display for text-based actions in absense of user input.
Michael van Ouwerkerk 2016/04/20 10:20:09 nit: s/absense/absence/
Peter Beverloo 2016/04/20 12:45:54 Done.
+ string? placeholder;
};
// Directionality options that can be indicated for notifications.
@@ -49,9 +61,12 @@ struct Notification {
// URL of the icon which is to be displayed with the notification.
string icon;
+ // URL of the badge representing the website displaying the notification.
+ string badge;
+
// Vibration pattern for the notification, following the syntax of the
// Vibration API. https://w3c.github.io/vibration/
- array<int32> vibration_pattern;
+ array<uint32> vibration_pattern;
// The time at which the event the notification represents took place.
double timestamp;
« content/browser/notifications/type_converters_unittest.cc ('K') | « content/content_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698