| 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" |
| 11 #include "public/platform/modules/notifications/WebNotificationData.h" | 11 #include "public/platform/modules/notifications/WebNotificationData.h" |
| 12 #include "public/platform/modules/notifications/WebNotificationResources.h" | 12 #include "public/platform/modules/notifications/WebNotificationResources.h" |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <stdint.h> | 14 #include <stdint.h> |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 namespace mojom { | |
| 19 namespace blink { | |
| 20 enum class PermissionStatus; | |
| 21 } | |
| 22 } | |
| 23 | |
| 24 class WebNotificationDelegate; | 18 class WebNotificationDelegate; |
| 25 class WebSecurityOrigin; | 19 class WebSecurityOrigin; |
| 26 class WebServiceWorkerRegistration; | 20 class WebServiceWorkerRegistration; |
| 27 | 21 |
| 28 // Structure representing the info associated with a persistent notification. | 22 // Structure representing the info associated with a persistent notification. |
| 29 struct WebPersistentNotificationInfo { | 23 struct WebPersistentNotificationInfo { |
| 30 int64_t persistentId = 0; | 24 int64_t persistentId = 0; |
| 31 WebNotificationData data; | 25 WebNotificationData data; |
| 32 }; | 26 }; |
| 33 | 27 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 55 | 49 |
| 56 // Closes a notification previously shown, and removes it if being shown. | 50 // Closes a notification previously shown, and removes it if being shown. |
| 57 virtual void close(WebNotificationDelegate*) = 0; | 51 virtual void close(WebNotificationDelegate*) = 0; |
| 58 | 52 |
| 59 // Closes a persistent notification identified by its persistent notificatio
n Id. | 53 // Closes a persistent notification identified by its persistent notificatio
n Id. |
| 60 virtual void closePersistent(const WebSecurityOrigin&, int64_t persistentNot
ificationId) = 0; | 54 virtual void closePersistent(const WebSecurityOrigin&, int64_t persistentNot
ificationId) = 0; |
| 61 | 55 |
| 62 // Indicates that the delegate object is being destroyed, and must no longer | 56 // Indicates that the delegate object is being destroyed, and must no longer |
| 63 // be used by the embedder to dispatch events. | 57 // be used by the embedder to dispatch events. |
| 64 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; | 58 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; |
| 65 | |
| 66 // Synchronously checks the permission level for the given origin. | |
| 67 virtual mojom::blink::PermissionStatus checkPermission(const WebSecurityOrig
in&) = 0; | |
| 68 }; | 59 }; |
| 69 | 60 |
| 70 } // namespace blink | 61 } // namespace blink |
| 71 | 62 |
| 72 #endif // WebNotificationManager_h | 63 #endif // WebNotificationManager_h |
| OLD | NEW |