| Index: content/public/browser/platform_notification_service.h
|
| diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
|
| index c1ad9ecd12d03f138b9723274bd68626e4583cad..7689ff65699bc9a352cb49dafb2c792460910a17 100644
|
| --- a/content/public/browser/platform_notification_service.h
|
| +++ b/content/public/browser/platform_notification_service.h
|
| @@ -33,6 +33,10 @@ class CONTENT_EXPORT PlatformNotificationService {
|
| public:
|
| virtual ~PlatformNotificationService() {}
|
|
|
| + using DisplayedNotificationsCallback =
|
| + base::Callback<void(std::unique_ptr<std::set<std::string>>,
|
| + bool /* supports synchronization */)>;
|
| +
|
| // Checks if |origin| has permission to display Web Notifications.
|
| // This method must only be called on the UI thread.
|
| virtual blink::mojom::PermissionStatus CheckPermissionOnUIThread(
|
| @@ -78,12 +82,11 @@ class CONTENT_EXPORT PlatformNotificationService {
|
| BrowserContext* browser_context,
|
| const std::string& notification_id) = 0;
|
|
|
| - // Writes the ids of all currently displaying notifications for the
|
| - // given |browser_context| to |displayed_notifications|. Returns whether the
|
| - // platform is able to provide such a set.
|
| - virtual bool GetDisplayedNotifications(
|
| + // Retrieves the ids of all currently displaying notifications and
|
| + // posts |callback| with the result.
|
| + virtual void GetDisplayedNotifications(
|
| BrowserContext* browser_context,
|
| - std::set<std::string>* displayed_notifications) = 0;
|
| + const DisplayedNotificationsCallback& callback) = 0;
|
| };
|
|
|
| } // namespace content
|
|
|