Chromium Code Reviews| OLD | NEW |
|---|---|
| 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> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 virtual void ClosePersistentNotification( | 77 virtual void ClosePersistentNotification( |
| 78 BrowserContext* browser_context, | 78 BrowserContext* browser_context, |
| 79 const std::string& notification_id) = 0; | 79 const std::string& notification_id) = 0; |
| 80 | 80 |
| 81 // Writes the ids of all currently displaying notifications for the | 81 // Writes the ids of all currently displaying notifications for the |
| 82 // given |browser_context| to |displayed_notifications|. Returns whether the | 82 // given |browser_context| to |displayed_notifications|. Returns whether the |
| 83 // platform is able to provide such a set. | 83 // platform is able to provide such a set. |
| 84 virtual bool GetDisplayedNotifications( | 84 virtual bool GetDisplayedNotifications( |
| 85 BrowserContext* browser_context, | 85 BrowserContext* browser_context, |
| 86 std::set<std::string>* displayed_notifications) = 0; | 86 std::set<std::string>* displayed_notifications) = 0; |
| 87 | |
| 88 // Asynchronous version of |GetDisplayedNotifications| | |
| 89 // TODO(miguelg) remove the sync version once all paths are ported. | |
| 90 virtual void GetDisplayedNotificationsAsync( | |
| 91 BrowserContext* browser_context, | |
| 92 const base::Callback<void(std::unique_ptr<std::set<std::string>>, | |
| 93 bool /* support sync */)>&) = 0; | |
|
Peter Beverloo
2017/02/24 16:12:24
Please define the callback's type with a `using` a
| |
| 87 }; | 94 }; |
| 88 | 95 |
| 89 } // namespace content | 96 } // namespace content |
| 90 | 97 |
| 91 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 98 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
| OLD | NEW |