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> |
| 9 |
8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
10 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
11 #include "content/public/common/show_desktop_notification_params.h" | 13 #include "content/public/common/show_desktop_notification_params.h" |
12 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" | 14 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" |
13 | 15 |
14 class GURL; | 16 class GURL; |
15 | 17 |
16 namespace content { | 18 namespace content { |
17 | 19 |
(...skipping 17 matching lines...) Expand all Loading... |
35 | 37 |
36 // Displays the notification described in |params| to the user. A closure | 38 // Displays the notification described in |params| to the user. A closure |
37 // through which the notification can be closed will be stored in the | 39 // through which the notification can be closed will be stored in the |
38 // |cancel_callback| argument. This method must be called on the UI thread. | 40 // |cancel_callback| argument. This method must be called on the UI thread. |
39 virtual void DisplayNotification( | 41 virtual void DisplayNotification( |
40 BrowserContext* browser_context, | 42 BrowserContext* browser_context, |
41 const ShowDesktopNotificationHostMsgParams& params, | 43 const ShowDesktopNotificationHostMsgParams& params, |
42 scoped_ptr<DesktopNotificationDelegate> delegate, | 44 scoped_ptr<DesktopNotificationDelegate> delegate, |
43 int render_process_id, | 45 int render_process_id, |
44 base::Closure* cancel_callback) = 0; | 46 base::Closure* cancel_callback) = 0; |
| 47 |
| 48 // Displays the persistent notification described in |notification_data| to |
| 49 // the user. This method must be called on the UI thread. |
| 50 virtual void DisplayPersistentNotification( |
| 51 BrowserContext* browser_context, |
| 52 int64 service_worker_registration_id, |
| 53 const ShowDesktopNotificationHostMsgParams& params, |
| 54 int render_process_id) = 0; |
| 55 |
| 56 // Closes the persistent notification identified by |
| 57 // |persistent_notification_id|. This method must be called on the UI thread. |
| 58 virtual void ClosePersistentNotification( |
| 59 BrowserContext* browser_context, |
| 60 const std::string& persistent_notification_id) = 0; |
45 }; | 61 }; |
46 | 62 |
47 } // namespace content | 63 } // namespace content |
48 | 64 |
49 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 65 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
OLD | NEW |