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

Side by Side Diff: ash/system/night_light/night_light_toggle_button.h

Issue 2965163002: [Night Light] Accessibility: Make ChromeVox speak button status on toggles (Closed)
Patch Set: Rebase Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/night_light/night_light_toggle_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_ 5 #ifndef ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_
6 #define ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_ 6 #define ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_
7 7
8 #include "ash/system/tray/system_menu_button.h" 8 #include "ash/system/tray/system_menu_button.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 // The NightLight toggle button in the system tray. 13 // The NightLight toggle button in the system tray.
14 class NightLightToggleButton : public SystemMenuButton { 14 class NightLightToggleButton : public SystemMenuButton {
15 public: 15 public:
16 explicit NightLightToggleButton(views::ButtonListener* listener); 16 explicit NightLightToggleButton(views::ButtonListener* listener);
17 ~NightLightToggleButton() override = default; 17 ~NightLightToggleButton() override = default;
18 18
19 // Toggles the status of NightLight.
20 void Toggle();
21
22 private:
19 // Updates the icon and its style based on the status of NightLight. 23 // Updates the icon and its style based on the status of NightLight.
20 void Update(); 24 void Update();
21 25
22 private:
23 // views::View: 26 // views::View:
24 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 27 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
25 28
26 DISALLOW_COPY_AND_ASSIGN(NightLightToggleButton); 29 DISALLOW_COPY_AND_ASSIGN(NightLightToggleButton);
27 }; 30 };
28 31
29 } // namespace ash 32 } // namespace ash
30 33
31 #endif // ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_ 34 #endif // ASH_SYSTEM_NIGHT_LIGHT_NIGHT_LIGHT_TOGGLE_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/night_light/night_light_toggle_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698