OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 5 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 notification_data.body, | 467 notification_data.body, |
468 gfx::Image::CreateFrom1xBitmap(notification_resources.notification_icon), | 468 gfx::Image::CreateFrom1xBitmap(notification_resources.notification_icon), |
469 message_center::NotifierId(origin), base::UTF8ToUTF16(origin.host()), | 469 message_center::NotifierId(origin), base::UTF8ToUTF16(origin.host()), |
470 origin, notification_data.tag, message_center::RichNotificationData(), | 470 origin, notification_data.tag, message_center::RichNotificationData(), |
471 delegate); | 471 delegate); |
472 | 472 |
473 notification.set_context_message( | 473 notification.set_context_message( |
474 DisplayNameForContextMessage(profile, origin)); | 474 DisplayNameForContextMessage(profile, origin)); |
475 notification.set_vibration_pattern(notification_data.vibration_pattern); | 475 notification.set_vibration_pattern(notification_data.vibration_pattern); |
476 notification.set_timestamp(notification_data.timestamp); | 476 notification.set_timestamp(notification_data.timestamp); |
| 477 notification.set_renotify(notification_data.renotify); |
477 notification.set_silent(notification_data.silent); | 478 notification.set_silent(notification_data.silent); |
478 | 479 |
479 std::vector<message_center::ButtonInfo> buttons; | 480 std::vector<message_center::ButtonInfo> buttons; |
480 | 481 |
481 // Developer supplied buttons. | 482 // Developer supplied buttons. |
482 for (const auto& action : notification_data.actions) | 483 for (const auto& action : notification_data.actions) |
483 buttons.push_back(message_center::ButtonInfo(action.title)); | 484 buttons.push_back(message_center::ButtonInfo(action.title)); |
484 | 485 |
485 notification.set_buttons(buttons); | 486 notification.set_buttons(buttons); |
486 | 487 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( | 542 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( |
542 origin.host(), extensions::ExtensionRegistry::EVERYTHING); | 543 origin.host(), extensions::ExtensionRegistry::EVERYTHING); |
543 DCHECK(extension); | 544 DCHECK(extension); |
544 | 545 |
545 return base::UTF8ToUTF16(extension->name()); | 546 return base::UTF8ToUTF16(extension->name()); |
546 } | 547 } |
547 #endif | 548 #endif |
548 | 549 |
549 return base::string16(); | 550 return base::string16(); |
550 } | 551 } |
OLD | NEW |