| 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 WebNotificationManager_h | 5 #ifndef WebNotificationManager_h |
| 6 #define WebNotificationManager_h | 6 #define WebNotificationManager_h |
| 7 | 7 |
| 8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
| 9 #include "public/platform/WebString.h" | 9 #include "public/platform/WebString.h" |
| 10 #include "public/platform/WebVector.h" | 10 #include "public/platform/WebVector.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // have their events delivered to the delegate specified in this call. | 38 // have their events delivered to the delegate specified in this call. |
| 39 virtual void show(const WebSecurityOrigin&, | 39 virtual void show(const WebSecurityOrigin&, |
| 40 const WebNotificationData&, | 40 const WebNotificationData&, |
| 41 std::unique_ptr<WebNotificationResources>, | 41 std::unique_ptr<WebNotificationResources>, |
| 42 WebNotificationDelegate*) = 0; | 42 WebNotificationDelegate*) = 0; |
| 43 | 43 |
| 44 // Shows a persistent notification on the user's system. These notifications | 44 // Shows a persistent notification on the user's system. These notifications |
| 45 // will have their events delivered to a Service Worker rather than the | 45 // will have their events delivered to a Service Worker rather than the |
| 46 // object's delegate. Will take ownership of the WebNotificationShowCallbacks | 46 // object's delegate. Will take ownership of the WebNotificationShowCallbacks |
| 47 // object. | 47 // object. |
| 48 virtual void showPersistent(const WebSecurityOrigin&, | 48 virtual void showPersistent( |
| 49 const WebNotificationData&, | 49 const WebSecurityOrigin&, |
| 50 std::unique_ptr<WebNotificationResources>, | 50 const WebNotificationData&, |
| 51 WebServiceWorkerRegistration*, | 51 std::unique_ptr<WebNotificationResources>, |
| 52 WebNotificationShowCallbacks*) = 0; | 52 WebServiceWorkerRegistration*, |
| 53 std::unique_ptr<WebNotificationShowCallbacks>) = 0; |
| 53 | 54 |
| 54 // Asynchronously gets the persistent notifications belonging to the Service | 55 // Asynchronously gets the persistent notifications belonging to the Service |
| 55 // Worker Registration. If |filterTag| is not an empty string, only the | 56 // Worker Registration. If |filterTag| is not an empty string, only the |
| 56 // notification with the given tag will be considered. Will take ownership of | 57 // notification with the given tag will be considered. Will take ownership of |
| 57 // the WebNotificationGetCallbacks object. | 58 // the WebNotificationGetCallbacks object. |
| 58 virtual void getNotifications(const WebString& filterTag, | 59 virtual void getNotifications( |
| 59 WebServiceWorkerRegistration*, | 60 const WebString& filterTag, |
| 60 WebNotificationGetCallbacks*) = 0; | 61 WebServiceWorkerRegistration*, |
| 62 std::unique_ptr<WebNotificationGetCallbacks>) = 0; |
| 61 | 63 |
| 62 // Closes a notification previously shown, and removes it if being shown. | 64 // Closes a notification previously shown, and removes it if being shown. |
| 63 virtual void close(WebNotificationDelegate*) = 0; | 65 virtual void close(WebNotificationDelegate*) = 0; |
| 64 | 66 |
| 65 // Closes a persistent notification identified by its notification Id. | 67 // Closes a persistent notification identified by its notification Id. |
| 66 virtual void closePersistent(const WebSecurityOrigin&, | 68 virtual void closePersistent(const WebSecurityOrigin&, |
| 67 const WebString& tag, | 69 const WebString& tag, |
| 68 const WebString& notificationId) = 0; | 70 const WebString& notificationId) = 0; |
| 69 | 71 |
| 70 // Indicates that the delegate object is being destroyed, and must no longer | 72 // Indicates that the delegate object is being destroyed, and must no longer |
| 71 // be used by the embedder to dispatch events. | 73 // be used by the embedder to dispatch events. |
| 72 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; | 74 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace blink | 77 } // namespace blink |
| 76 | 78 |
| 77 #endif // WebNotificationManager_h | 79 #endif // WebNotificationManager_h |
| OLD | NEW |