OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 // Fills in |notifications| with a set of notification ids currently being | 38 // Fills in |notifications| with a set of notification ids currently being |
39 // displayed for a given profile. | 39 // displayed for a given profile. |
40 // The return value expresses whether the underlying platform has the | 40 // The return value expresses whether the underlying platform has the |
41 // capability to provide displayed notifications so the empty set | 41 // capability to provide displayed notifications so the empty set |
42 // can be disambiguated. | 42 // can be disambiguated. |
43 virtual bool GetDisplayed(const std::string& profile_id, | 43 virtual bool GetDisplayed(const std::string& profile_id, |
44 bool incognito, | 44 bool incognito, |
45 std::set<std::string>* notification_ids) const = 0; | 45 std::set<std::string>* notification_ids) const = 0; |
46 | 46 |
| 47 // Asynchronous version of |GetDisplayed| |
| 48 // TODO(miguelg): remove the sync version once all paths have been updated. |
| 49 virtual void GetDisplayedAsync( |
| 50 const std::string& profile_id, |
| 51 bool incognito, |
| 52 const NotificationCommon::NotificationResultCallback& callback) const = 0; |
| 53 |
47 protected: | 54 protected: |
48 NotificationPlatformBridge() {} | 55 NotificationPlatformBridge() {} |
49 | 56 |
50 private: | 57 private: |
51 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridge); | 58 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridge); |
52 }; | 59 }; |
53 | 60 |
54 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ | 61 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ |
OLD | NEW |