| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.h" | 5 #include "chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" | 9 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" |
| 10 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 10 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 MAP_STATE(AXBooleanProperty::EDITABLE, ui::AX_STATE_EDITABLE); | 185 MAP_STATE(AXBooleanProperty::EDITABLE, ui::AX_STATE_EDITABLE); |
| 186 MAP_STATE(AXBooleanProperty::MULTI_LINE, ui::AX_STATE_MULTILINE); | 186 MAP_STATE(AXBooleanProperty::MULTI_LINE, ui::AX_STATE_MULTILINE); |
| 187 MAP_STATE(AXBooleanProperty::PASSWORD, ui::AX_STATE_PROTECTED); | 187 MAP_STATE(AXBooleanProperty::PASSWORD, ui::AX_STATE_PROTECTED); |
| 188 MAP_STATE(AXBooleanProperty::SELECTED, ui::AX_STATE_SELECTED); | 188 MAP_STATE(AXBooleanProperty::SELECTED, ui::AX_STATE_SELECTED); |
| 189 | 189 |
| 190 #undef MAP_STATE | 190 #undef MAP_STATE |
| 191 | 191 |
| 192 if (GetBooleanProperty(node, AXBooleanProperty::CHECKABLE)) { | 192 if (GetBooleanProperty(node, AXBooleanProperty::CHECKABLE)) { |
| 193 const bool is_checked = | 193 const bool is_checked = |
| 194 GetBooleanProperty(node, AXBooleanProperty::CHECKED); | 194 GetBooleanProperty(node, AXBooleanProperty::CHECKED); |
| 195 const ui::AXCheckedState checked_state = | 195 const ui::AXButtonState checked_state = |
| 196 is_checked ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE; | 196 is_checked ? ui::AX_BUTTON_STATE_TRUE : ui::AX_BUTTON_STATE_FALSE; |
| 197 out_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state); | 197 out_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state); |
| 198 } | 198 } |
| 199 | 199 |
| 200 if (!GetBooleanProperty(node, AXBooleanProperty::ENABLED)) | 200 if (!GetBooleanProperty(node, AXBooleanProperty::ENABLED)) |
| 201 out_data->AddState(ui::AX_STATE_DISABLED); | 201 out_data->AddState(ui::AX_STATE_DISABLED); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace | 204 } // namespace |
| 205 | 205 |
| 206 namespace arc { | 206 namespace arc { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 focused_node_id_ = -1; | 411 focused_node_id_ = -1; |
| 412 extensions::AutomationEventRouter* router = | 412 extensions::AutomationEventRouter* router = |
| 413 extensions::AutomationEventRouter::GetInstance(); | 413 extensions::AutomationEventRouter::GetInstance(); |
| 414 if (!router) | 414 if (!router) |
| 415 return; | 415 return; |
| 416 | 416 |
| 417 router->DispatchTreeDestroyedEvent(tree_id(), nullptr); | 417 router->DispatchTreeDestroyedEvent(tree_id(), nullptr); |
| 418 } | 418 } |
| 419 | 419 |
| 420 } // namespace arc | 420 } // namespace arc |
| OLD | NEW |