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

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

Issue 1855443002: Implement receiving side of web notification inline replies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test and removed unnecessary code. 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/Source/modules/notifications/Notification.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index bd780fbcaea5d56d1f51f6416ccc982e9731b685..ca0f8ca9443805ac6ce847317ceb2a0618f0441a 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -302,9 +302,20 @@ HeapVector<NotificationAction> Notification::actions() const
actions.grow(m_data.actions.size());
for (size_t i = 0; i < m_data.actions.size(); ++i) {
+ switch (m_data.actions[i].type) {
+ case WebNotificationAction::Button:
+ actions[i].setType("button");
+ break;
+ case WebNotificationAction::Text:
+ actions[i].setType("text");
+ break;
+ default:
+ NOTREACHED() << "Unknown action type: " << m_data.actions[i].type;
+ }
actions[i].setAction(m_data.actions[i].action);
actions[i].setTitle(m_data.actions[i].title);
actions[i].setIcon(m_data.actions[i].icon.string());
+ actions[i].setPlaceholder(m_data.actions[i].placeholder);
}
return actions;

Powered by Google App Engine
This is Rietveld 408576698