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

Side by Side Diff: content/renderer/accessibility/blink_ax_enum_conversion.cc

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeVox and Automation API tests Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/accessibility/blink_ax_enum_conversion.h" 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return ui::AX_SORT_DIRECTION_DESCENDING; 471 return ui::AX_SORT_DIRECTION_DESCENDING;
472 case blink::WebAXSortDirectionOther: 472 case blink::WebAXSortDirectionOther:
473 return ui::AX_SORT_DIRECTION_OTHER; 473 return ui::AX_SORT_DIRECTION_OTHER;
474 default: 474 default:
475 NOTREACHED(); 475 NOTREACHED();
476 } 476 }
477 477
478 return ui::AX_SORT_DIRECTION_NONE; 478 return ui::AX_SORT_DIRECTION_NONE;
479 } 479 }
480 480
481 } // Namespace content. 481 ui::AXNameFrom AXNameFromFromBlink(blink::WebAXNameFrom name_from) {
482 switch (name_from) {
483 case blink::WebAXNameFromUninitialized:
484 return ui::AX_NAME_FROM_UNINITIALIZED;
485 case blink::WebAXNameFromAttribute:
486 return ui::AX_NAME_FROM_ATTRIBUTE;
487 case blink::WebAXNameFromCaption:
488 return ui::AX_NAME_FROM_RELATED_ELEMENT;
489 case blink::WebAXNameFromContents:
490 return ui::AX_NAME_FROM_CONTENTS;
491 case blink::WebAXNameFromPlaceholder:
492 return ui::AX_NAME_FROM_PLACEHOLDER;
493 case blink::WebAXNameFromRelatedElement:
494 return ui::AX_NAME_FROM_RELATED_ELEMENT;
495 case blink::WebAXNameFromValue:
496 return ui::AX_NAME_FROM_VALUE;
497 case blink::WebAXNameFromTitle:
498 return ui::AX_NAME_FROM_ATTRIBUTE;
499 default:
500 NOTREACHED();
501 }
502
503 return ui::AX_NAME_FROM_UNINITIALIZED;
504 }
505
506 ui::AXDescriptionFrom AXDescriptionFromFromBlink(
507 blink::WebAXDescriptionFrom description_from) {
508 switch (description_from) {
aboxhall 2015/11/13 23:13:49 space??
dmazzoni 2015/11/16 18:52:04 Huh? I don't see the error
509 case blink::WebAXDescriptionFromUninitialized:
510 return ui::AX_DESCRIPTION_FROM_UNINITIALIZED;
511 case blink::WebAXDescriptionFromAttribute:
512 return ui::AX_DESCRIPTION_FROM_ATTRIBUTE;
513 case blink::WebAXDescriptionFromContents:
514 return ui::AX_DESCRIPTION_FROM_CONTENTS;
515 case blink::WebAXDescriptionFromPlaceholder:
516 return ui::AX_DESCRIPTION_FROM_PLACEHOLDER;
517 case blink::WebAXDescriptionFromRelatedElement:
518 return ui::AX_DESCRIPTION_FROM_RELATED_ELEMENT;
519 default:
520 NOTREACHED();
521 }
522
523 return ui::AX_DESCRIPTION_FROM_UNINITIALIZED;
524 }
525
526 } // namespace content.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698