| 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_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| 7 | 7 |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // NotificationHandler implementation | 22 // NotificationHandler implementation |
| 23 void OnClose(Profile* profile, | 23 void OnClose(Profile* profile, |
| 24 const std::string& origin, | 24 const std::string& origin, |
| 25 const std::string& notification_id, | 25 const std::string& notification_id, |
| 26 bool by_user) override; | 26 bool by_user) override; |
| 27 | 27 |
| 28 void OnClick(Profile* profile, | 28 void OnClick(Profile* profile, |
| 29 const std::string& origin, | 29 const std::string& origin, |
| 30 const std::string& notification_id, | 30 const std::string& notification_id, |
| 31 int action_index) override; | 31 int action_index, |
| 32 const base::NullableString16& reply) override; |
| 32 | 33 |
| 33 void OpenSettings(Profile* profile) override; | 34 void OpenSettings(Profile* profile) override; |
| 34 | 35 |
| 35 void RegisterNotification(const std::string& notification_id, | 36 void RegisterNotification(const std::string& notification_id, |
| 36 NotificationDelegate* delegate) override; | 37 NotificationDelegate* delegate) override; |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 // map of delegate objects keyed by notification id. | 40 // map of delegate objects keyed by notification id. |
| 40 std::unordered_map<std::string, scoped_refptr<NotificationDelegate>> | 41 std::unordered_map<std::string, scoped_refptr<NotificationDelegate>> |
| 41 notifications_; | 42 notifications_; |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler); | 44 DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 #endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ | 47 #endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| OLD | NEW |