| 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/modules/notifications/WebNotificationPermission.h" | 9 #include "public/platform/modules/notifications/WebNotificationPermission.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 virtual ~WebNotificationManager() { } | 24 virtual ~WebNotificationManager() { } |
| 25 | 25 |
| 26 // Shows a page notification on the user's system. These notifications will
have their | 26 // Shows a page notification on the user's system. These notifications will
have their |
| 27 // events delivered to the delegate specified in this call. | 27 // events delivered to the delegate specified in this call. |
| 28 virtual void show(const WebSerializedOrigin&, const WebNotificationData&, We
bNotificationDelegate*) = 0; | 28 virtual void show(const WebSerializedOrigin&, const WebNotificationData&, We
bNotificationDelegate*) = 0; |
| 29 | 29 |
| 30 // Shows a persistent notification on the user's system. These notifications
will have | 30 // Shows a persistent notification on the user's system. These notifications
will have |
| 31 // their events delivered to a Service Worker rather than the object's deleg
ate. Will | 31 // their events delivered to a Service Worker rather than the object's deleg
ate. Will |
| 32 // take ownership of the WebNotificationShowCallbacks object. | 32 // take ownership of the WebNotificationShowCallbacks object. |
| 33 virtual void showPersistent(const WebSerializedOrigin&, const WebNotificatio
nData&, WebServiceWorkerRegistration*, WebNotificationShowCallbacks*) { } | 33 virtual void showPersistent(const WebSerializedOrigin&, const WebNotificatio
nData&, WebServiceWorkerRegistration*, WebNotificationShowCallbacks*) = 0; |
| 34 | 34 |
| 35 // Closes a notification previously shown, and removes it if being shown. | 35 // Closes a notification previously shown, and removes it if being shown. |
| 36 virtual void close(WebNotificationDelegate*) = 0; | 36 virtual void close(WebNotificationDelegate*) = 0; |
| 37 | 37 |
| 38 // Closes a persistent notification identified by its persistent notificatio
n Id. | 38 // Closes a persistent notification identified by its persistent notificatio
n Id. |
| 39 virtual void closePersistent(const WebString& persistentNotificationId) { } | 39 virtual void closePersistent(const WebSerializedOrigin&, const WebString& pe
rsistentNotificationId) = 0; |
| 40 | 40 |
| 41 // Indicates that the delegate object is being destroyed, and must no longer | 41 // Indicates that the delegate object is being destroyed, and must no longer |
| 42 // be used by the embedder to dispatch events. | 42 // be used by the embedder to dispatch events. |
| 43 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; | 43 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; |
| 44 | 44 |
| 45 // Synchronously checks the permission level for the given origin. | 45 // Synchronously checks the permission level for the given origin. |
| 46 virtual WebNotificationPermission checkPermission(const WebSerializedOrigin&
) = 0; | 46 virtual WebNotificationPermission checkPermission(const WebSerializedOrigin&
) = 0; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace blink | 49 } // namespace blink |
| 50 | 50 |
| 51 #endif // WebNotificationManager_h | 51 #endif // WebNotificationManager_h |
| OLD | NEW |