Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1798)

Unified Diff: chrome/browser/chromeos/arc/notification/arc_notification_manager.h

Issue 1475583002: Add IPC messages for ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..54c4e32111301c44b063f30d22095802785290ea
--- /dev/null
+++ b/chrome/browser/chromeos/arc/notification/arc_notification_manager.h
@@ -0,0 +1,39 @@
+// 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 <set>
+#include <string>
+
+#include "components/arc/arc_bridge_service.h"
+#include "components/arc/common/arc_notification_types.h"
+
+namespace chromeos {
+
+class ArcNotificationItem;
+
+class ArcNotificationManager : public arc::ArcBridgeService::Observer {
+ public:
+ ArcNotificationManager();
+ ~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 NotifyNotificationRemovedFromChrome(const std::string& key);
+ void NotifyNotificationClickedFromChrome(const std::string& key);
+
+ private:
+ typedef std::map<std::string, ArcNotificationItem*> Items;
+ Items items_;
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698