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

Unified Diff: components/exo/notification_surface_manager.h

Issue 2065133002: exo: Implement notification surface support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-wayland-protocol
Patch Set: address comments from reveman Created 4 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: components/exo/notification_surface_manager.h
diff --git a/components/exo/notification_surface_manager.h b/components/exo/notification_surface_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..447af482bdd7af2d002da1c6a9fc67fc17c8d6fb
--- /dev/null
+++ b/components/exo/notification_surface_manager.h
@@ -0,0 +1,32 @@
+// Copyright 2016 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 COMPONENTS_EXO_NOTIFICATION_SURFACE_REGISTRY_H_
reveman 2016/06/23 16:34:53 nit: s/REGISTRY/MANAGER/
xiyuan 2016/06/23 17:46:09 Done.
+#define COMPONENTS_EXO_NOTIFICATION_SURFACE_REGISTRY_H_
reveman 2016/06/23 16:34:53 nit: s/REGISTRY/MANAGER/
xiyuan 2016/06/23 17:46:09 Done.
+
+#include <string>
+
+namespace exo {
+
+class NotificationSurface;
+
+class NotificationSurfaceManager {
+ public:
+ // Gets the NotificationSurface associated with the given notification id.
+ // Returns nullptr if no NotificationSurface is associated with the id.
+ virtual NotificationSurface* GetSurface(
+ const std::string& notification_id) const = 0;
+
+ // Adds a NotificationSurface to the manager.
+ virtual void AddSurface(NotificationSurface* surface) = 0;
+
+ // Removes a NotificationSurface from the manager.
+ virtual void RemoveSurface(NotificationSurface* surface) = 0;
+
+ virtual ~NotificationSurfaceManager() {}
reveman 2016/06/23 16:34:53 nit: please make this protected after changing Set
xiyuan 2016/06/23 17:46:09 Done.
+};
+
+} // namespace exo
+
+#endif // COMPONENTS_EXO_NOTIFICATION_SURFACE_REGISTRY_H_
reveman 2016/06/23 16:34:53 nit: s/REGISTRY/MANAGER/
xiyuan 2016/06/23 17:46:09 Done.

Powered by Google App Engine
This is Rietveld 408576698