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

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

Issue 2935893004: Add unittest for ArcNotificationContentView (Closed)
Patch Set: . 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 2017 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 class ArcNotificationSurfaceManagerImpl
22 : public ArcNotificationSurfaceManager,
23 public exo::NotificationSurfaceManager {
24 public:
25 ArcNotificationSurfaceManagerImpl();
26 ~ArcNotificationSurfaceManagerImpl() override;
27
28 // ArcNotificationSurfaceManager:
29 ArcNotificationSurface* GetArcSurface(
30 const std::string& notification_id) const override;
31 void AddObserver(Observer* observer) override;
32 void RemoveObserver(Observer* observer) override;
33
34 // exo::NotificationSurfaceManager:
35 exo::NotificationSurface* GetSurface(
36 const std::string& notification_id) const override;
37 void AddSurface(exo::NotificationSurface* surface) override;
38 void RemoveSurface(exo::NotificationSurface* surface) override;
39
40 private:
41 using NotificationSurfaceMap =
42 std::unordered_map<std::string,
43 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