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

Side by Side Diff: ui/arc/notification/arc_notification_surface_manager_impl.h

Issue 2723143002: Add unittests of ArcCustomNotificationView (Closed)
Patch Set: wip Created 3 years, 6 months 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 2016 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 UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_MANAGER_IMPL_H_
6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_MANAGER_IMPL_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/macros.h"
12 #include "base/observer_list.h"
13 #include "components/exo/notification_surface_manager.h"
14 #include "ui/arc/notification/arc_notification_surface_manager.h"
15
16 namespace arc {
17
18 class ArcNotificationSurface;
19 class ArcNotificationSurfaceImpl;
20
21 // Keeps track of NotificationSurface.
22 class ArcNotificationSurfaceManagerImpl
23 : public ArcNotificationSurfaceManager,
24 public exo::NotificationSurfaceManager {
25 public:
26 ArcNotificationSurfaceManagerImpl();
27 ~ArcNotificationSurfaceManagerImpl() override;
28
29 // ArcNotificationSurfaceManager:
30 ArcNotificationSurface* GetArcSurface(
31 const std::string& notification_id) const override;
32 void AddObserver(Observer* observer) override;
33 void RemoveObserver(Observer* observer) override;
34
35 // exo::NotificationSurfaceManager:
36 exo::NotificationSurface* GetSurface(
37 const std::string& notification_id) const override;
38 void AddSurface(exo::NotificationSurface* surface) override;
39 void RemoveSurface(exo::NotificationSurface* surface) override;
40
41 private:
42 using NotificationSurfaceMap =
43 std::map<std::string, std::unique_ptr<ArcNotificationSurfaceImpl>>;
44 NotificationSurfaceMap notification_surface_map_;
45
46 base::ObserverList<Observer> observers_;
47
48 DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurfaceManagerImpl);
49 };
50
51 } // namespace arc
52
53 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_notification_surface_manager.cc ('k') | ui/arc/notification/arc_notification_surface_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698