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

Unified Diff: ash/system/night_light/tray_night_light.h

Issue 2857103007: [Night Light] CL2: Ash and system tray work (Closed)
Patch Set: Update comment Created 3 years, 7 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: ash/system/night_light/tray_night_light.h
diff --git a/ash/system/night_light/tray_night_light.h b/ash/system/night_light/tray_night_light.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a38d3f9f869670e1ce779ebf4d197f84b5eeebc
--- /dev/null
+++ b/ash/system/night_light/tray_night_light.h
@@ -0,0 +1,34 @@
+// 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 ASH_SYSTEM_NIGHT_LIGHT_TRAY_NIGHT_LIGHT_H_
+#define ASH_SYSTEM_NIGHT_LIGHT_TRAY_NIGHT_LIGHT_H_
+
+#include "ash/system/night_light/night_light_controller.h"
+#include "ash/system/tray/tray_image_item.h"
+#include "base/macros.h"
+
+namespace ash {
+
+// Shows the NightLight icon in the system tray whenever NightLight is enabled
+// and active.
+class TrayNightLight : public TrayImageItem,
+ public NightLightController::Observer {
+ public:
+ explicit TrayNightLight(SystemTray* system_tray);
+ ~TrayNightLight() override;
+
+ // ash::NightLightController::Observer:
+ void OnNightLightEnabledChanged(bool enabled) override;
+
+ // ash::TrayImageItem:
+ bool GetInitialVisibility() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TrayNightLight);
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_NIGHT_LIGHT_TRAY_NIGHT_LIGHT_H_
« no previous file with comments | « ash/system/night_light/night_light_controller_unittest.cc ('k') | ash/system/night_light/tray_night_light.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698