Chromium Code Reviews| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 virtual void Close(const std::string& profile_id, | 38 virtual void Close(const std::string& profile_id, |
| 39 const std::string& notification_id) = 0; | 39 const std::string& notification_id) = 0; |
| 40 | 40 |
| 41 // Writes the ids of all currently displaying notifications and posts | 41 // Writes the ids of all currently displaying notifications and posts |
| 42 // |callback| with the result. | 42 // |callback| with the result. |
| 43 virtual void GetDisplayed( | 43 virtual void GetDisplayed( |
| 44 const std::string& profile_id, | 44 const std::string& profile_id, |
| 45 bool incognito, | 45 bool incognito, |
| 46 const GetDisplayedNotificationsCallback& callback) const = 0; | 46 const GetDisplayedNotificationsCallback& callback) const = 0; |
| 47 | 47 |
| 48 // Calls |callback| once |this| is initialized. The argument is | |
| 49 // true if |this| is ready to be used and false if initialization | |
| 50 // failed. |callback| may be called directly or from a posted task. | |
|
Peter Beverloo
2017/04/26 13:53:36
nit: no double spaces. I don't mind what you do in
Tom (Use chromium acct)
2017/04/26 17:56:53
Done.
| |
| 51 virtual void SetReadyCallback(NotificationBridgeReadyCallback callback) = 0; | |
| 52 | |
| 48 protected: | 53 protected: |
| 49 NotificationPlatformBridge() {} | 54 NotificationPlatformBridge() {} |
| 50 | 55 |
| 51 private: | 56 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridge); | 57 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridge); |
| 53 }; | 58 }; |
| 54 | 59 |
| 55 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ | 60 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_H_ |
| OLD | NEW |