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

Unified Diff: third_party/WebKit/Source/modules/notifications/NotificationData.cpp

Issue 1855443002: Implement receiving side of web notification inline replies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/Source/modules/notifications/NotificationData.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
index ed67c9e3882698816287013ef69bab0c2bbc438d..e1614fd00fe63364512ee6741859ee605ce78417 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
@@ -92,6 +92,14 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext
WebNotificationAction webAction;
webAction.action = action.action();
webAction.title = action.title();
+ webAction.type = action.type();
+
+ if (action.hasPlaceholder() && action.type() == "button") {
+ exceptionState.throwTypeError("Notifications of type \"button\" cannot specify a placeholder.");
+ return WebNotificationData();
+ }
+
+ webAction.placeholder = action.placeholder();
if (action.hasIcon() && !action.icon().isEmpty())
webAction.icon = completeURL(executionContext, action.icon());

Powered by Google App Engine
This is Rietveld 408576698