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

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

Issue 2707263011: Test aria-pressed=mixed on windows (Closed)
Patch Set: git cl try 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 unified diff | Download patch
« no previous file with comments | « ash/system/ime_menu/ime_list_view.cc ('k') | ash/system/tray/hover_highlight_view.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 #include "ash/system/night_light/night_light_toggle_button.h" 5 #include "ash/system/night_light/night_light_toggle_button.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/strings/grit/ash_strings.h" 8 #include "ash/strings/grit/ash_strings.h"
9 #include "ash/system/night_light/night_light_controller.h" 9 #include "ash/system/night_light/night_light_controller.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 GetNightLightNormalStateIcon(night_light_enabled)); 54 GetNightLightNormalStateIcon(night_light_enabled));
55 SetImage(views::Button::STATE_DISABLED, 55 SetImage(views::Button::STATE_DISABLED,
56 GetNightLightDisabledStateIcon(night_light_enabled)); 56 GetNightLightDisabledStateIcon(night_light_enabled));
57 } 57 }
58 58
59 void NightLightToggleButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { 59 void NightLightToggleButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
60 node_data->SetName( 60 node_data->SetName(
61 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NIGHT_LIGHT)); 61 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NIGHT_LIGHT));
62 node_data->role = ui::AX_ROLE_TOGGLE_BUTTON; 62 node_data->role = ui::AX_ROLE_TOGGLE_BUTTON;
63 if (Shell::Get()->night_light_controller()->GetEnabled()) 63 if (Shell::Get()->night_light_controller()->GetEnabled())
64 node_data->AddState(ui::AX_STATE_PRESSED); 64 node_data->AddIntAttribute(ui::AX_ATTR_PRESSED_STATE,
65 ui::AX_BUTTON_STATE_TRUE);
65 } 66 }
66 67
67 } // namespace ash 68 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/ime_menu/ime_list_view.cc ('k') | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698