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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ui/arc/notification/arc_notification_surface_manager_impl.h
diff --git a/ui/arc/notification/arc_notification_surface_manager_impl.h b/ui/arc/notification/arc_notification_surface_manager_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..eecf76268361d51922ed9ab96bcb23d9adbb959e
--- /dev/null
+++ b/ui/arc/notification/arc_notification_surface_manager_impl.h
@@ -0,0 +1,53 @@
+// Copyright 2017 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 UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_MANAGER_IMPL_H_
+#define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_MANAGER_IMPL_H_
+
+#include <map>
+#include <string>
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "components/exo/notification_surface_manager.h"
+#include "ui/arc/notification/arc_notification_surface_manager.h"
+
+namespace arc {
+
+class ArcNotificationSurface;
+class ArcNotificationSurfaceImpl;
+
+class ArcNotificationSurfaceManagerImpl
+ : public ArcNotificationSurfaceManager,
+ public exo::NotificationSurfaceManager {
+ public:
+ ArcNotificationSurfaceManagerImpl();
+ ~ArcNotificationSurfaceManagerImpl() override;
+
+ // ArcNotificationSurfaceManager:
+ ArcNotificationSurface* GetArcSurface(
+ const std::string& notification_id) const override;
+ void AddObserver(Observer* observer) override;
+ void RemoveObserver(Observer* observer) override;
+
+ // exo::NotificationSurfaceManager:
+ exo::NotificationSurface* GetSurface(
+ const std::string& notification_id) const override;
+ void AddSurface(exo::NotificationSurface* surface) override;
+ void RemoveSurface(exo::NotificationSurface* surface) override;
+
+ private:
+ using NotificationSurfaceMap =
+ std::unordered_map<std::string,
+ std::unique_ptr<ArcNotificationSurfaceImpl>>;
+ NotificationSurfaceMap notification_surface_map_;
+
+ base::ObserverList<Observer> observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurfaceManagerImpl);
+};
+
+} // namespace arc
+
+#endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_MANAGER_IMPL_H_
« 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