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

Side by Side Diff: ui/views/controls/button/custom_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 | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/image_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 (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/button/custom_button.h" 5 #include "ui/views/controls/button/custom_button.h"
6 6
7 #include "ui/accessibility/ax_node_data.h" 7 #include "ui/accessibility/ax_node_data.h"
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/event_utils.h" 9 #include "ui/events/event_utils.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 AnimateInkDrop(InkDropState::HIDDEN, nullptr /* event */); 352 AnimateInkDrop(InkDropState::HIDDEN, nullptr /* event */);
353 } 353 }
354 354
355 void CustomButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { 355 void CustomButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
356 Button::GetAccessibleNodeData(node_data); 356 Button::GetAccessibleNodeData(node_data);
357 switch (state_) { 357 switch (state_) {
358 case STATE_HOVERED: 358 case STATE_HOVERED:
359 node_data->AddState(ui::AX_STATE_HOVERED); 359 node_data->AddState(ui::AX_STATE_HOVERED);
360 break; 360 break;
361 case STATE_PRESSED: 361 case STATE_PRESSED:
362 node_data->AddState(ui::AX_STATE_PRESSED); 362 node_data->AddIntAttribute(ui::AX_ATTR_PRESSED_STATE,
363 ui::AX_BUTTON_STATE_TRUE);
363 break; 364 break;
364 case STATE_DISABLED: 365 case STATE_DISABLED:
365 node_data->AddState(ui::AX_STATE_DISABLED); 366 node_data->AddState(ui::AX_STATE_DISABLED);
366 break; 367 break;
367 case STATE_NORMAL: 368 case STATE_NORMAL:
368 case STATE_COUNT: 369 case STATE_COUNT:
369 // No additional accessibility node_data set for this button node_data. 370 // No additional accessibility node_data set for this button node_data.
370 break; 371 break;
371 } 372 }
372 if (enabled()) { 373 if (enabled()) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 GetInkDrop()->GetTargetInkDropState() == 498 GetInkDrop()->GetTargetInkDropState() ==
498 views::InkDropState::ALTERNATE_ACTION_PENDING) { 499 views::InkDropState::ALTERNATE_ACTION_PENDING) {
499 AnimateInkDrop(views::InkDropState::HIDDEN, 500 AnimateInkDrop(views::InkDropState::HIDDEN,
500 ui::LocatedEvent::FromIfValid(&event)); 501 ui::LocatedEvent::FromIfValid(&event));
501 } 502 }
502 } 503 }
503 Button::OnClickCanceled(event); 504 Button::OnClickCanceled(event);
504 } 505 }
505 506
506 } // namespace views 507 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698