| 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/persistent_notification_delegate.h" | 5 #include "chrome/browser/notifications/persistent_notification_delegate.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/guid.h" | 8 #include "base/guid.h" |
| 9 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 9 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 10 #include "content/public/common/persistent_notification_status.h" | 10 #include "content/public/common/persistent_notification_status.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose( | 26 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose( |
| 27 browser_context_, | 27 browser_context_, |
| 28 persistent_notification_id_, | 28 persistent_notification_id_, |
| 29 origin_); | 29 origin_); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void PersistentNotificationDelegate::Click() { | 32 void PersistentNotificationDelegate::Click() { |
| 33 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( | 33 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( |
| 34 browser_context_, | 34 browser_context_, |
| 35 persistent_notification_id_, | 35 persistent_notification_id_, |
| 36 origin_); | 36 origin_, |
| 37 -1 /* action_index */); |
| 38 } |
| 39 |
| 40 void PersistentNotificationDelegate::ButtonClick(int button_index) { |
| 41 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( |
| 42 browser_context_, |
| 43 persistent_notification_id_, |
| 44 origin_, |
| 45 button_index); |
| 37 } | 46 } |
| 38 | 47 |
| 39 std::string PersistentNotificationDelegate::id() const { | 48 std::string PersistentNotificationDelegate::id() const { |
| 40 return id_; | 49 return id_; |
| 41 } | 50 } |
| OLD | NEW |