miguelg | 76bc017 | 2017-04-05 23:57:57 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_NOTIFICATIONS_DISPLAYED_NOTIFICATIONS_DISPATCH_CALLBACK_H_ |
| 6 | #define CHROME_BROWSER_NOTIFICATIONS_DISPLAYED_NOTIFICATIONS_DISPATCH_CALLBACK_H_ |
| 7 | |
| 8 | #include <set> |
Richard Knoll | c638359 | 2019-01-28 18:06:58 | [diff] [blame] | 9 | #include <string> |
miguelg | 76bc017 | 2017-04-05 23:57:57 | [diff] [blame] | 10 | |
| 11 | #include "base/callback.h" |
| 12 | |
| 13 | // Callback used by the bridge and all the downstream classes that propagate |
| 14 | // the callback to get displayed notifications. |
Anita Woodruff | 692248a | 2018-01-18 16:28:39 | [diff] [blame] | 15 | // |
| 16 | // |supports_synchronization| will be true if the platform supports getting the |
| 17 | // currently displayed notifications. |
| 18 | // |
| 19 | // If |supports_synchronization| is true, then |notification_ids| will contain |
| 20 | // the ids of the currently displayed notifications, otherwise the value of |
| 21 | // |notification_ids| should be ignored. |
miguelg | 76bc017 | 2017-04-05 23:57:57 | [diff] [blame] | 22 | using GetDisplayedNotificationsCallback = |
Richard Knoll | c638359 | 2019-01-28 18:06:58 | [diff] [blame] | 23 | base::OnceCallback<void(std::set<std::string> notification_ids, |
| 24 | bool supports_synchronization)>; |
miguelg | 76bc017 | 2017-04-05 23:57:57 | [diff] [blame] | 25 | |
| 26 | #endif // CHROME_BROWSER_NOTIFICATIONS_DISPLAYED_NOTIFICATIONS_DISPATCH_CALLBACK_H_ |