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