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

Unified Diff: ash/common/system/tray/wm_system_tray_notifier.h

Issue 2060633002: mash: Introduce WmSystemTrayNotifier for //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testupdate
Patch Set: rebase 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/common/system/tray/wm_system_tray_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/wm_system_tray_notifier.h
diff --git a/ash/common/system/tray/wm_system_tray_notifier.h b/ash/common/system/tray/wm_system_tray_notifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..9931f968f743cc0d56ad776b8a68ce9307a76116
--- /dev/null
+++ b/ash/common/system/tray/wm_system_tray_notifier.h
@@ -0,0 +1,40 @@
+// 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 ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
+#define ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
+
+#include "ash/ash_export.h"
+#include "base/macros.h"
+#include "base/observer_list.h"
+
+namespace ash {
+
+struct UpdateInfo;
+class UpdateObserver;
+
+// Observer and notification manager for the ash system tray. This version
+// contains the observers that have been ported to //ash/common. See also
+// ash::SystemTrayNotifier.
+// TODO(jamescook): After all the observers have been moved, rename this class
+// to SystemTrayNotifier.
+class ASH_EXPORT WmSystemTrayNotifier {
+ public:
+ WmSystemTrayNotifier();
+ ~WmSystemTrayNotifier();
+
+ void AddUpdateObserver(UpdateObserver* observer);
+ void RemoveUpdateObserver(UpdateObserver* observer);
+
+ void NotifyUpdateRecommended(const UpdateInfo& info);
+
+ private:
+ base::ObserverList<UpdateObserver> update_observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(WmSystemTrayNotifier);
+};
+
+} // namespace ash
+
+#endif // ASH_COMMON_SYSTEM_TRAY_WM_SYSTEM_TRAY_NOTIFIER_H_
« no previous file with comments | « ash/ash.gyp ('k') | ash/common/system/tray/wm_system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698