| Index: chrome/browser/notifications/notification_platform_bridge.h
|
| diff --git a/chrome/browser/notifications/notification_platform_bridge.h b/chrome/browser/notifications/notification_platform_bridge.h
|
| index 720245c8c8eb12465b5ab9d6d5ed949b4daa636f..9f467b0fb344081f2b2634c569deb19ced798955 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge.h
|
| +++ b/chrome/browser/notifications/notification_platform_bridge.h
|
| @@ -8,6 +8,7 @@
|
| #include <set>
|
| #include <string>
|
|
|
| +#include "base/callback_forward.h"
|
| #include "base/macros.h"
|
| #include "chrome/browser/notifications/notification_common.h"
|
|
|
| @@ -19,6 +20,10 @@ class Notification;
|
| // TODO(miguelg): Add support for click and close events.
|
| class NotificationPlatformBridge {
|
| public:
|
| + using DisplayedNotificationsCallback =
|
| + base::Callback<void(std::unique_ptr<std::set<std::string>>,
|
| + bool /* supports synchronization */)>;
|
| +
|
| static NotificationPlatformBridge* Create();
|
|
|
| virtual ~NotificationPlatformBridge() {}
|
| @@ -35,14 +40,12 @@ class NotificationPlatformBridge {
|
| virtual void Close(const std::string& profile_id,
|
| const std::string& notification_id) = 0;
|
|
|
| - // Fills in |notifications| with a set of notification ids currently being
|
| - // displayed for a given profile.
|
| - // The return value expresses whether the underlying platform has the
|
| - // capability to provide displayed notifications so the empty set
|
| - // can be disambiguated.
|
| - virtual bool GetDisplayed(const std::string& profile_id,
|
| - bool incognito,
|
| - std::set<std::string>* notification_ids) const = 0;
|
| + // Writes the ids of all currently displaying notifications and posts
|
| + // |callback| with the result.
|
| + virtual void GetDisplayed(
|
| + const std::string& profile_id,
|
| + bool incognito,
|
| + const DisplayedNotificationsCallback& callback) const = 0;
|
|
|
| protected:
|
| NotificationPlatformBridge() {}
|
|
|