| 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_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Displays the notification described in |params| to the user. A closure | 39 // Displays the notification described in |params| to the user. A closure |
| 40 // through which the notification can be closed will be stored in the | 40 // through which the notification can be closed will be stored in the |
| 41 // |cancel_callback| argument. This method must be called on the UI thread. | 41 // |cancel_callback| argument. This method must be called on the UI thread. |
| 42 virtual void DisplayNotification( | 42 virtual void DisplayNotification( |
| 43 BrowserContext* browser_context, | 43 BrowserContext* browser_context, |
| 44 const GURL& origin, | 44 const GURL& origin, |
| 45 const SkBitmap& icon, | 45 const SkBitmap& icon, |
| 46 const PlatformNotificationData& notification_data, | 46 const PlatformNotificationData& notification_data, |
| 47 scoped_ptr<DesktopNotificationDelegate> delegate, | 47 scoped_ptr<DesktopNotificationDelegate> delegate, |
| 48 int render_process_id, | |
| 49 base::Closure* cancel_callback) = 0; | 48 base::Closure* cancel_callback) = 0; |
| 50 | 49 |
| 51 // Displays the persistent notification described in |notification_data| to | 50 // Displays the persistent notification described in |notification_data| to |
| 52 // the user. This method must be called on the UI thread. | 51 // the user. This method must be called on the UI thread. |
| 53 virtual void DisplayPersistentNotification( | 52 virtual void DisplayPersistentNotification( |
| 54 BrowserContext* browser_context, | 53 BrowserContext* browser_context, |
| 55 int64 service_worker_registration_id, | 54 int64 service_worker_registration_id, |
| 56 const GURL& origin, | 55 const GURL& origin, |
| 57 const SkBitmap& icon, | 56 const SkBitmap& icon, |
| 58 const PlatformNotificationData& notification_data, | 57 const PlatformNotificationData& notification_data) = 0; |
| 59 int render_process_id) = 0; | |
| 60 | 58 |
| 61 // Closes the persistent notification identified by | 59 // Closes the persistent notification identified by |
| 62 // |persistent_notification_id|. This method must be called on the UI thread. | 60 // |persistent_notification_id|. This method must be called on the UI thread. |
| 63 virtual void ClosePersistentNotification( | 61 virtual void ClosePersistentNotification( |
| 64 BrowserContext* browser_context, | 62 BrowserContext* browser_context, |
| 65 const std::string& persistent_notification_id) = 0; | 63 const std::string& persistent_notification_id) = 0; |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 } // namespace content | 66 } // namespace content |
| 69 | 67 |
| 70 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 68 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
| OLD | NEW |