| 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 #ifndef CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ | 6 #define CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "content/public/browser/desktop_notification_delegate.h" | 10 #include "content/public/browser/desktop_notification_delegate.h" |
| 9 | 11 |
| 10 namespace content { | 12 namespace content { |
| 11 | 13 |
| 12 // A delegate used by the notification service to report the results of platform | 14 // A delegate used by the notification service to report the results of platform |
| 13 // notification interactions to Web Notifications whose lifetime is tied to | 15 // notification interactions to Web Notifications whose lifetime is tied to |
| 14 // that of the page displaying them. | 16 // that of the page displaying them. |
| 15 class PageNotificationDelegate : public DesktopNotificationDelegate { | 17 class PageNotificationDelegate : public DesktopNotificationDelegate { |
| 16 public: | 18 public: |
| 17 PageNotificationDelegate(int render_process_id, int notification_id); | 19 PageNotificationDelegate(int render_process_id, |
| 20 int non_persistent_notification_id, |
| 21 const std::string& notification_id); |
| 18 ~PageNotificationDelegate() override; | 22 ~PageNotificationDelegate() override; |
| 19 | 23 |
| 20 // DesktopNotificationDelegate implementation. | 24 // DesktopNotificationDelegate implementation. |
| 21 void NotificationDisplayed() override; | 25 void NotificationDisplayed() override; |
| 22 void NotificationClosed() override; | 26 void NotificationClosed() override; |
| 23 void NotificationClick() override; | 27 void NotificationClick() override; |
| 24 | 28 |
| 25 private: | 29 private: |
| 26 int render_process_id_; | 30 int render_process_id_; |
| 27 int notification_id_; | 31 int non_persistent_notification_id_; |
| 32 std::string notification_id_; |
| 28 }; | 33 }; |
| 29 | 34 |
| 30 } // namespace content | 35 } // namespace content |
| 31 | 36 |
| 32 #endif // CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ | 37 #endif // CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ |
| OLD | NEW |