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

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

Issue 2907503002: Use correct theme for the off icon of NightLight, fix tooltip and a11y (Closed)
Patch Set: Expose button for tests. 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
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/system/night_light/night_light_toggle_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/night_light/night_light_toggle_button.h
diff --git a/ash/system/night_light/night_light_toggle_button.h b/ash/system/night_light/night_light_toggle_button.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a93c8c5a9c34f15b123f4c4be4625b2aac883e3
--- /dev/null
+++ b/ash/system/night_light/night_light_toggle_button.h
@@ -0,0 +1,31 @@
+// 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_NIGHT_LIGHT_TOGGLE_BUTTON_H_
+#define ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_
+
+#include "ash/system/tray/system_menu_button.h"
+#include "base/macros.h"
+
+namespace ash {
+
+// The NightLight toggle button in the system tray.
Daniel Erat 2017/05/25 17:59:51 nit: "Night Light" instead throughout? that's how
afakhry 2017/05/25 18:03:31 I've been consistently calling it NightLight in al
+class NightLightToggleButton : public SystemMenuButton {
+ public:
+ explicit NightLightToggleButton(views::ButtonListener* listener);
+ ~NightLightToggleButton() override = default;
+
+ // Updates the icon and its style based on the status of NightLight.
+ void Update();
+
+ private:
+ // views::View:
+ void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
+
+ DISALLOW_COPY_AND_ASSIGN(NightLightToggleButton);
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/system/night_light/night_light_toggle_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698