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

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

Issue 2857103007: [Night Light] CL2: Ash and system tray work (Closed)
Patch Set: Exclude one test from mash 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..4bcc8b4c070f50a212c30f84a075ea9bf0ec236b
--- /dev/null
+++ b/ash/system/night_light/tray_night_light.h
@@ -0,0 +1,33 @@
+// 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"
+
+namespace ash {
+
+// Shows the NightLight icon in the system tray whenever NightLight is enabled
+// and active.
James Cook 2017/05/05 17:12:32 Thanks for adding a class comment.
afakhry 2017/05/05 20:04:11 Acknowledged.
+class TrayNightLight : public TrayImageItem,
+ public NightLightController::Observer {
+ public:
+ TrayNightLight(SystemTray* system_tray);
James Cook 2017/05/05 17:12:32 nit: explicit
afakhry 2017/05/05 20:04:11 I'm surprised the linter didn't catch that. Done.
+ ~TrayNightLight() override;
+
+ // ash::NightLightController::Observer:
+ void OnStatusChanged(bool new_status) override;
+
+ // ash::TrayImageItem:
+ bool GetInitialVisibility() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TrayNightLight);
James Cook 2017/05/05 17:12:32 #include macros.h
afakhry 2017/05/05 20:04:11 Done.
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_NIGHT_LIGHT_TRAY_NIGHT_LIGHT_H_

Powered by Google App Engine
This is Rietveld 408576698