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

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.cc

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 | « no previous file | chrome/browser/notifications/platform_notification_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 63508b3e29baa9914c59d5139ee622d74085dd82..50a3430c7d5f25a02a3006593ceb9e1bb3b814e3 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -335,6 +335,12 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
notification.set_vibration_pattern(notification_data.vibration_pattern);
notification.set_silent(notification_data.silent);
+ std::vector<message_center::ButtonInfo> buttons;
+ for (const auto& action : notification_data.actions)
+ buttons.push_back(message_center::ButtonInfo(action.title));
+
+ notification.set_buttons(buttons);
+
// Web Notifications do not timeout.
notification.set_never_timeout(true);
« no previous file with comments | « no previous file | chrome/browser/notifications/platform_notification_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698