| 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 dc4cf994e758ec7dfa17e9e4813992c112de1eb4..9a30b059f66849da36e16822132d12d72516e313 100644
|
| --- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
| +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
| @@ -8,6 +8,7 @@
|
| #include <vector>
|
|
|
| #include "base/command_line.h"
|
| +#include "base/logging.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/metrics/user_metrics_action.h"
|
| #include "base/strings/string_number_conversions.h"
|
| @@ -468,10 +469,20 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
|
| std::vector<message_center::ButtonInfo> buttons;
|
| for (size_t i = 0; i < notification_data.actions.size(); i++) {
|
| message_center::ButtonInfo button(notification_data.actions[i].title);
|
| + switch (notification_data.actions[i].type) {
|
| + case content::PLATFORM_NOTIFICATION_ACTION_TYPE_BUTTON:
|
| + button.type = message_center::BUTTON_INFO_TYPE_BUTTON;
|
| + break;
|
| + case content::PLATFORM_NOTIFICATION_ACTION_TYPE_TEXT:
|
| + button.type = message_center::BUTTON_INFO_TYPE_TEXT;
|
| + break;
|
| + }
|
| +
|
| // TODO(peter): Handle different screen densities instead of always using
|
| // the 1x bitmap - crbug.com/585815.
|
| button.icon =
|
| gfx::Image::CreateFrom1xBitmap(notification_resources.action_icons[i]);
|
| + button.placeholder = notification_data.actions[i].placeholder;
|
| buttons.push_back(button);
|
| }
|
| notification.set_buttons(buttons);
|
|
|