| 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 UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ | 5 #ifndef UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ |
| 6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ | 6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // ArcBridgeService::Observer implementation: | 30 // ArcBridgeService::Observer implementation: |
| 31 void OnNotificationsInstanceReady() override; | 31 void OnNotificationsInstanceReady() override; |
| 32 | 32 |
| 33 // NotificationsHost implementation: | 33 // NotificationsHost implementation: |
| 34 void OnNotificationPosted(ArcNotificationDataPtr data) override; | 34 void OnNotificationPosted(ArcNotificationDataPtr data) override; |
| 35 void OnNotificationRemoved(const mojo::String& key) override; | 35 void OnNotificationRemoved(const mojo::String& key) override; |
| 36 | 36 |
| 37 // Methods called from ArcNotificationItem: | 37 // Methods called from ArcNotificationItem: |
| 38 void SendNotificationRemovedFromChrome(const std::string& key); | 38 void SendNotificationRemovedFromChrome(const std::string& key); |
| 39 void SendNotificationClickedOnChrome(const std::string& key); | 39 void SendNotificationClickedOnChrome(const std::string& key); |
| 40 void SendNotificationButtonClickedOnChrome( |
| 41 const std::string& key, int button_index); |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 const AccountId main_profile_id_; | 44 const AccountId main_profile_id_; |
| 43 | 45 |
| 44 using ItemMap = | 46 using ItemMap = |
| 45 base::ScopedPtrHashMap<std::string, scoped_ptr<ArcNotificationItem>>; | 47 base::ScopedPtrHashMap<std::string, scoped_ptr<ArcNotificationItem>>; |
| 46 ItemMap items_; | 48 ItemMap items_; |
| 47 | 49 |
| 48 mojo::Binding<arc::NotificationsHost> binding_; | 50 mojo::Binding<arc::NotificationsHost> binding_; |
| 49 | 51 |
| 50 DISALLOW_COPY_AND_ASSIGN(ArcNotificationManager); | 52 DISALLOW_COPY_AND_ASSIGN(ArcNotificationManager); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace arc | 55 } // namespace arc |
| 54 | 56 |
| 55 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ | 57 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ |
| OLD | NEW |