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

Side by Side Diff: chrome/browser/chromeos/arc/notification/arc_notification_manager.h

Issue 1477733002: Add ArcNotificationManager for new ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO comment about ArcServiceManager Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "chrome/browser/profiles/profile.h"
12 #include "components/arc/arc_bridge_service.h"
13
14 namespace chromeos {
15
16 class ArcNotificationItem;
17
18 class ArcNotificationManager
19 : public arc::ArcBridgeService::NotificationObserver {
20 public:
21 explicit ArcNotificationManager(arc::ArcBridgeService* bridge_service,
22 Profile* main_profile);
23 ~ArcNotificationManager() override;
24
25 // arc::ArcBridgeService::Observer implementation:
26 void OnNotificationPostedFromAndroid(
27 const arc::ArcNotificationData& data) override;
28 void OnNotificationRemovedFromAndroid(const std::string& key) override;
29
30 // Methods called from ArcNotificationItem:
31 void SendNotificationRemovedFromChrome(const std::string& key);
32 void SendNotificationClickedOnChrome(const std::string& key);
33
34 private:
35 arc::ArcBridgeService* arc_bridge_;
36 Profile* main_profile_;
37
38 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.
39 Items items_;
40 };
41
42 } // namespace chromeos
43
44 #endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698