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