| 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 |
| 18 class WebNotificationDelegate; | 24 class WebNotificationDelegate; |
| 19 class WebSecurityOrigin; | 25 class WebSecurityOrigin; |
| 20 class WebServiceWorkerRegistration; | 26 class WebServiceWorkerRegistration; |
| 21 | 27 |
| 22 // Structure representing the info associated with a persistent notification. | 28 // Structure representing the info associated with a persistent notification. |
| 23 struct WebPersistentNotificationInfo { | 29 struct WebPersistentNotificationInfo { |
| 24 int64_t persistentId = 0; | 30 int64_t persistentId = 0; |
| 25 WebNotificationData data; | 31 WebNotificationData data; |
| 26 }; | 32 }; |
| 27 | 33 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 | 55 |
| 50 // Closes a notification previously shown, and removes it if being shown. | 56 // Closes a notification previously shown, and removes it if being shown. |
| 51 virtual void close(WebNotificationDelegate*) = 0; | 57 virtual void close(WebNotificationDelegate*) = 0; |
| 52 | 58 |
| 53 // Closes a persistent notification identified by its persistent notificatio
n Id. | 59 // Closes a persistent notification identified by its persistent notificatio
n Id. |
| 54 virtual void closePersistent(const WebSecurityOrigin&, int64_t persistentNot
ificationId) = 0; | 60 virtual void closePersistent(const WebSecurityOrigin&, int64_t persistentNot
ificationId) = 0; |
| 55 | 61 |
| 56 // Indicates that the delegate object is being destroyed, and must no longer | 62 // Indicates that the delegate object is being destroyed, and must no longer |
| 57 // be used by the embedder to dispatch events. | 63 // be used by the embedder to dispatch events. |
| 58 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; | 64 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; |
| 59 }; | 68 }; |
| 60 | 69 |
| 61 } // namespace blink | 70 } // namespace blink |
| 62 | 71 |
| 63 #endif // WebNotificationManager_h | 72 #endif // WebNotificationManager_h |
| OLD | NEW |