Chromium Code Reviews| 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..00e9910017e96662a64a7148df0ccca748b4358a 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 NotificationResultCallback = |
| + base::Callback<void(std::unique_ptr<std::set<std::string>>, |
| + bool /* supports synchronization */)>; |
|
Peter Beverloo
2017/03/15 18:07:51
Something to consider: now that the first argument
Miguel Garcia
2017/03/16 14:57:42
I played with it a little because I thought it was
|
| + |
| // 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 Writes the ids of all currently displaying notifications and |
|
Peter Beverloo
2017/03/15 18:07:51
nit: s/Writes//
Miguel Garcia
2017/03/16 14:57:42
Done.
|
| + // posts |callback| with the result. |
| + virtual void GetDisplayedNotifications( |
| BrowserContext* browser_context, |
| - std::set<std::string>* displayed_notifications) = 0; |
| + const NotificationResultCallback& callback) = 0; |
| }; |
| } // namespace content |