Index: chrome/browser/chromeos/arc/notification/arc_notification_manager.h |
diff --git a/chrome/browser/chromeos/arc/notification/arc_notification_manager.h b/chrome/browser/chromeos/arc/notification/arc_notification_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..03bb60b155f59e333eb229c631d0597de5560034 |
--- /dev/null |
+++ b/chrome/browser/chromeos/arc/notification/arc_notification_manager.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ |
+#define CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ |
+ |
+#include <map> |
+#include <string> |
+ |
+#include "chrome/browser/profiles/profile.h" |
+#include "components/arc/arc_bridge_service.h" |
+ |
+namespace chromeos { |
+ |
+class ArcNotificationItem; |
+ |
+class ArcNotificationManager |
+ : public arc::ArcBridgeService::NotificationObserver { |
+ public: |
+ explicit ArcNotificationManager(arc::ArcBridgeService* bridge_service, |
+ Profile* main_profile); |
+ ~ArcNotificationManager() override; |
+ |
+ // arc::ArcBridgeService::Observer implementation: |
+ void OnNotificationPostedFromAndroid( |
+ const arc::ArcNotificationData& data) override; |
+ void OnNotificationRemovedFromAndroid(const std::string& key) override; |
+ |
+ // Methods called from ArcNotificationItem: |
+ void SendNotificationRemovedFromChrome(const std::string& key); |
+ void SendNotificationClickedOnChrome(const std::string& key); |
+ |
+ private: |
+ arc::ArcBridgeService* arc_bridge_; |
+ Profile* main_profile_; |
+ |
+ typedef std::map<std::string, ArcNotificationItem*> Items; |
hidehiko
2015/12/11 05:18:00
the value can be scoped_ptr?
yoshiki
2015/12/14 15:19:30
Done with ScopedPtrHashMap.
|
+ Items items_; |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ |