Chromium Code Reviews| 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 da15f65a863f65c6f47c28b96dcb36ded24a7313..48ed88acf310833e552687096cc6f5a94eea26fa 100644 |
| --- a/chrome/browser/notifications/platform_notification_service_impl.cc |
| +++ b/chrome/browser/notifications/platform_notification_service_impl.cc |
| @@ -22,6 +22,7 @@ |
| #include "content/public/browser/notification_event_dispatcher.h" |
| #include "content/public/browser/platform_notification_context.h" |
| #include "content/public/browser/storage_partition.h" |
| +#include "content/public/common/platform_notification_action.h" |
| #include "content/public/common/platform_notification_data.h" |
| #include "net/base/net_util.h" |
| #include "ui/message_center/notifier_settings.h" |
| @@ -335,6 +336,11 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData( |
| notification.set_vibration_pattern(notification_data.vibration_pattern); |
| notification.set_silent(notification_data.silent); |
| + std::vector<message_center::ButtonInfo> buttons; |
| + for (content::PlatformNotificationAction action : notification_data.actions) |
|
Peter Beverloo
2015/07/30 17:02:04
const& to avoid the copies.
Fine to use auto.
johnme
2015/07/31 18:21:31
Done.
|
| + buttons.push_back(message_center::ButtonInfo(action.title)); |
| + notification.set_buttons(buttons); |
|
Peter Beverloo
2015/07/30 17:02:05
micro nit: blank line above this one.
johnme
2015/07/31 18:21:31
Done.
|
| + |
| // Web Notifications do not timeout. |
| notification.set_never_timeout(true); |