| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 return ui::AX_EVENT_TEXT_CHANGED; | 405 return ui::AX_EVENT_TEXT_CHANGED; |
| 406 case blink::kWebAXEventValueChanged: | 406 case blink::kWebAXEventValueChanged: |
| 407 return ui::AX_EVENT_VALUE_CHANGED; | 407 return ui::AX_EVENT_VALUE_CHANGED; |
| 408 default: | 408 default: |
| 409 // We can't add an assertion here, that prevents us | 409 // We can't add an assertion here, that prevents us |
| 410 // from adding new event enums in Blink. | 410 // from adding new event enums in Blink. |
| 411 return ui::AX_EVENT_NONE; | 411 return ui::AX_EVENT_NONE; |
| 412 } | 412 } |
| 413 } | 413 } |
| 414 | 414 |
| 415 ui::AXSupportedAction AXSupportedActionFromBlink( | 415 ui::AXDefaultActionVerb AXDefaultActionVerbFromBlink( |
| 416 blink::WebAXSupportedAction supported_action) { | 416 blink::WebAXDefaultActionVerb action_verb) { |
| 417 switch (supported_action) { | 417 switch (action_verb) { |
| 418 case blink::WebAXSupportedAction::kNone: | 418 case blink::WebAXDefaultActionVerb::kNone: |
| 419 return ui::AX_SUPPORTED_ACTION_NONE; | 419 return ui::AX_DEFAULT_ACTION_VERB_NONE; |
| 420 case blink::WebAXSupportedAction::kActivate: | 420 case blink::WebAXDefaultActionVerb::kActivate: |
| 421 return ui::AX_SUPPORTED_ACTION_ACTIVATE; | 421 return ui::AX_DEFAULT_ACTION_VERB_ACTIVATE; |
| 422 case blink::WebAXSupportedAction::kCheck: | 422 case blink::WebAXDefaultActionVerb::kCheck: |
| 423 return ui::AX_SUPPORTED_ACTION_CHECK; | 423 return ui::AX_DEFAULT_ACTION_VERB_CHECK; |
| 424 case blink::WebAXSupportedAction::kClick: | 424 case blink::WebAXDefaultActionVerb::kClick: |
| 425 return ui::AX_SUPPORTED_ACTION_CLICK; | 425 return ui::AX_DEFAULT_ACTION_VERB_CLICK; |
| 426 case blink::WebAXSupportedAction::kJump: | 426 case blink::WebAXDefaultActionVerb::kJump: |
| 427 return ui::AX_SUPPORTED_ACTION_JUMP; | 427 return ui::AX_DEFAULT_ACTION_VERB_JUMP; |
| 428 case blink::WebAXSupportedAction::kOpen: | 428 case blink::WebAXDefaultActionVerb::kOpen: |
| 429 return ui::AX_SUPPORTED_ACTION_OPEN; | 429 return ui::AX_DEFAULT_ACTION_VERB_OPEN; |
| 430 case blink::WebAXSupportedAction::kPress: | 430 case blink::WebAXDefaultActionVerb::kPress: |
| 431 return ui::AX_SUPPORTED_ACTION_PRESS; | 431 return ui::AX_DEFAULT_ACTION_VERB_PRESS; |
| 432 case blink::WebAXSupportedAction::kSelect: | 432 case blink::WebAXDefaultActionVerb::kSelect: |
| 433 return ui::AX_SUPPORTED_ACTION_SELECT; | 433 return ui::AX_DEFAULT_ACTION_VERB_SELECT; |
| 434 case blink::WebAXSupportedAction::kUncheck: | 434 case blink::WebAXDefaultActionVerb::kUncheck: |
| 435 return ui::AX_SUPPORTED_ACTION_UNCHECK; | 435 return ui::AX_DEFAULT_ACTION_VERB_UNCHECK; |
| 436 } | 436 } |
| 437 NOTREACHED(); | 437 NOTREACHED(); |
| 438 return ui::AX_SUPPORTED_ACTION_NONE; | 438 return ui::AX_DEFAULT_ACTION_VERB_NONE; |
| 439 } | 439 } |
| 440 | 440 |
| 441 ui::AXMarkerType AXMarkerTypeFromBlink(blink::WebAXMarkerType marker_type) { | 441 ui::AXMarkerType AXMarkerTypeFromBlink(blink::WebAXMarkerType marker_type) { |
| 442 switch (marker_type) { | 442 switch (marker_type) { |
| 443 case blink::kWebAXMarkerTypeSpelling: | 443 case blink::kWebAXMarkerTypeSpelling: |
| 444 return ui::AX_MARKER_TYPE_SPELLING; | 444 return ui::AX_MARKER_TYPE_SPELLING; |
| 445 case blink::kWebAXMarkerTypeGrammar: | 445 case blink::kWebAXMarkerTypeGrammar: |
| 446 return ui::AX_MARKER_TYPE_GRAMMAR; | 446 return ui::AX_MARKER_TYPE_GRAMMAR; |
| 447 case blink::kWebAXMarkerTypeTextMatch: | 447 case blink::kWebAXMarkerTypeTextMatch: |
| 448 return ui::AX_MARKER_TYPE_TEXT_MATCH; | 448 return ui::AX_MARKER_TYPE_TEXT_MATCH; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 case blink::kWebAXTextAffinityUpstream: | 603 case blink::kWebAXTextAffinityUpstream: |
| 604 return ui::AX_TEXT_AFFINITY_UPSTREAM; | 604 return ui::AX_TEXT_AFFINITY_UPSTREAM; |
| 605 case blink::kWebAXTextAffinityDownstream: | 605 case blink::kWebAXTextAffinityDownstream: |
| 606 return ui::AX_TEXT_AFFINITY_DOWNSTREAM; | 606 return ui::AX_TEXT_AFFINITY_DOWNSTREAM; |
| 607 } | 607 } |
| 608 NOTREACHED(); | 608 NOTREACHED(); |
| 609 return ui::AX_TEXT_AFFINITY_DOWNSTREAM; | 609 return ui::AX_TEXT_AFFINITY_DOWNSTREAM; |
| 610 } | 610 } |
| 611 | 611 |
| 612 } // namespace content. | 612 } // namespace content. |
| OLD | NEW |