Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Side by Side Diff: third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h

Issue 1898153002: Migrate notifications to use the PermissionStatus enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix type traits conflicts Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/WebNotificationPermission.h"
13 #include "public/platform/modules/notifications/WebNotificationResources.h" 12 #include "public/platform/modules/notifications/WebNotificationResources.h"
14 #include <memory> 13 #include <memory>
15 #include <stdint.h> 14 #include <stdint.h>
16 15
17 namespace blink { 16 namespace blink {
18 17
18 namespace mojom {
19 enum class PermissionStatus;
20 }
21
19 class WebNotificationDelegate; 22 class WebNotificationDelegate;
20 class WebSecurityOrigin; 23 class WebSecurityOrigin;
21 class WebServiceWorkerRegistration; 24 class WebServiceWorkerRegistration;
22 25
23 // Structure representing the info associated with a persistent notification. 26 // Structure representing the info associated with a persistent notification.
24 struct WebPersistentNotificationInfo { 27 struct WebPersistentNotificationInfo {
25 int64_t persistentId = 0; 28 int64_t persistentId = 0;
26 WebNotificationData data; 29 WebNotificationData data;
27 }; 30 };
28 31
(...skipping 23 matching lines...) Expand all
52 virtual void close(WebNotificationDelegate*) = 0; 55 virtual void close(WebNotificationDelegate*) = 0;
53 56
54 // Closes a persistent notification identified by its persistent notificatio n Id. 57 // Closes a persistent notification identified by its persistent notificatio n Id.
55 virtual void closePersistent(const WebSecurityOrigin&, int64_t persistentNot ificationId) = 0; 58 virtual void closePersistent(const WebSecurityOrigin&, int64_t persistentNot ificationId) = 0;
56 59
57 // 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
58 // be used by the embedder to dispatch events. 61 // be used by the embedder to dispatch events.
59 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0; 62 virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0;
60 63
61 // Synchronously checks the permission level for the given origin. 64 // Synchronously checks the permission level for the given origin.
62 virtual WebNotificationPermission checkPermission(const WebSecurityOrigin&) = 0; 65 virtual mojom::PermissionStatus checkPermission(const WebSecurityOrigin&) = 0;
63 }; 66 };
64 67
65 } // namespace blink 68 } // namespace blink
66 69
67 #endif // WebNotificationManager_h 70 #endif // WebNotificationManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698