OLD | NEW |
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 Loading... |
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) { |
| 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. |
OLD | NEW |