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

Side by Side Diff: content/public/browser/platform_notification_service.h

Issue 1943963004: Revert of (reland) Move permission.mojom from WebKit/public/platform/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « content/public/browser/permission_manager.h ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ 6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
16 #include "components/permissions/permission_status.mojom.h"
17 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h"
18 18
19 class GURL; 19 class GURL;
20 20
21 namespace content { 21 namespace content {
22 22
23 class BrowserContext; 23 class BrowserContext;
24 class DesktopNotificationDelegate; 24 class DesktopNotificationDelegate;
25 struct NotificationResources; 25 struct NotificationResources;
26 struct PlatformNotificationData; 26 struct PlatformNotificationData;
27 class ResourceContext; 27 class ResourceContext;
28 28
29 // The service using which notifications can be presented to the user. There 29 // The service using which notifications can be presented to the user. There
30 // should be a unique instance of the PlatformNotificationService depending 30 // should be a unique instance of the PlatformNotificationService depending
31 // on the browsing context being used. 31 // on the browsing context being used.
32 class CONTENT_EXPORT PlatformNotificationService { 32 class CONTENT_EXPORT PlatformNotificationService {
33 public: 33 public:
34 virtual ~PlatformNotificationService() {} 34 virtual ~PlatformNotificationService() {}
35 35
36 // Checks if |origin| has permission to display Web Notifications. 36 // Checks if |origin| has permission to display Web Notifications.
37 // This method must only be called on the UI thread. 37 // This method must only be called on the UI thread.
38 virtual permissions::mojom::PermissionStatus CheckPermissionOnUIThread( 38 virtual blink::mojom::PermissionStatus CheckPermissionOnUIThread(
39 BrowserContext* browser_context, 39 BrowserContext* browser_context,
40 const GURL& origin, 40 const GURL& origin,
41 int render_process_id) = 0; 41 int render_process_id) = 0;
42 42
43 // Checks if |origin| has permission to display Web Notifications. This method 43 // Checks if |origin| has permission to display Web Notifications. This method
44 // exists to serve the synchronous IPC required by the Notification.permission 44 // exists to serve the synchronous IPC required by the Notification.permission
45 // JavaScript getter, and should not be used for other purposes. See 45 // JavaScript getter, and should not be used for other purposes. See
46 // https://crbug.com/446497 for the plan to deprecate this method. 46 // https://crbug.com/446497 for the plan to deprecate this method.
47 // This method must only be called on the IO thread. 47 // This method must only be called on the IO thread.
48 virtual permissions::mojom::PermissionStatus CheckPermissionOnIOThread( 48 virtual blink::mojom::PermissionStatus CheckPermissionOnIOThread(
49 ResourceContext* resource_context, 49 ResourceContext* resource_context,
50 const GURL& origin, 50 const GURL& origin,
51 int render_process_id) = 0; 51 int render_process_id) = 0;
52 52
53 // Displays the notification described in |notification_data| to the user. A 53 // Displays the notification described in |notification_data| to the user. A
54 // closure through which the notification can be closed will be stored in the 54 // closure through which the notification can be closed will be stored in the
55 // |cancel_callback| argument. This method must be called on the UI thread. 55 // |cancel_callback| argument. This method must be called on the UI thread.
56 virtual void DisplayNotification( 56 virtual void DisplayNotification(
57 BrowserContext* browser_context, 57 BrowserContext* browser_context,
58 const GURL& origin, 58 const GURL& origin,
(...skipping 21 matching lines...) Expand all
80 // given |browser_context| to |displayed_notifications|. Returns whether the 80 // given |browser_context| to |displayed_notifications|. Returns whether the
81 // platform is able to provide such a set. 81 // platform is able to provide such a set.
82 virtual bool GetDisplayedPersistentNotifications( 82 virtual bool GetDisplayedPersistentNotifications(
83 BrowserContext* browser_context, 83 BrowserContext* browser_context,
84 std::set<std::string>* displayed_notifications) = 0; 84 std::set<std::string>* displayed_notifications) = 0;
85 }; 85 };
86 86
87 } // namespace content 87 } // namespace content
88 88
89 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ 89 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
OLDNEW
« no previous file with comments | « content/public/browser/permission_manager.h ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698