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

Side by Side Diff: ui/views/controls/menu/menu_item_view.cc

Issue 2707263011: Test aria-pressed=mixed on windows (Closed)
Patch Set: git cl try Created 3 years, 6 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 | « ui/views/controls/button/toggle_button.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/menu/menu_item_view.h" 5 #include "ui/views/controls/menu/menu_item_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 node_data->SetName(GetAccessibleNameForMenuItem(item_text, GetMinorText())); 170 node_data->SetName(GetAccessibleNameForMenuItem(item_text, GetMinorText()));
171 171
172 switch (GetType()) { 172 switch (GetType()) {
173 case SUBMENU: 173 case SUBMENU:
174 node_data->AddState(ui::AX_STATE_HASPOPUP); 174 node_data->AddState(ui::AX_STATE_HASPOPUP);
175 break; 175 break;
176 case CHECKBOX: 176 case CHECKBOX:
177 case RADIO: { 177 case RADIO: {
178 const bool is_checked = GetDelegate()->IsItemChecked(GetCommand()); 178 const bool is_checked = GetDelegate()->IsItemChecked(GetCommand());
179 const ui::AXCheckedState checked_state = 179 const ui::AXButtonState checked_state =
180 is_checked ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE; 180 is_checked ? ui::AX_BUTTON_STATE_TRUE : ui::AX_BUTTON_STATE_FALSE;
181 node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state); 181 node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
182 } break; 182 } break;
183 case NORMAL: 183 case NORMAL:
184 case SEPARATOR: 184 case SEPARATOR:
185 case EMPTY: 185 case EMPTY:
186 // No additional accessibility states currently for these menu states. 186 // No additional accessibility states currently for these menu states.
187 break; 187 break;
188 } 188 }
189 } 189 }
190 190
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } else { 1068 } else {
1069 const Type& type = menu_item->GetType(); 1069 const Type& type = menu_item->GetType();
1070 if (type == CHECKBOX || type == RADIO) 1070 if (type == CHECKBOX || type == RADIO)
1071 return true; 1071 return true;
1072 } 1072 }
1073 } 1073 }
1074 return false; 1074 return false;
1075 } 1075 }
1076 1076
1077 } // namespace views 1077 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/toggle_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698