| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "modules/accessibility/InspectorAccessibilityAgent.h" | 5 #include "modules/accessibility/InspectorAccessibilityAgent.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/dom/AXObjectCache.h" | 8 #include "core/dom/AXObjectCache.h" |
| 9 #include "core/dom/DOMNodeIds.h" | 9 #include "core/dom/DOMNodeIds.h" |
| 10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 properties.addItem( | 246 properties.addItem( |
| 247 CreateProperty(AXWidgetAttributesEnum::Valuetext, | 247 CreateProperty(AXWidgetAttributesEnum::Valuetext, |
| 248 CreateValue(ax_object.ValueDescription()))); | 248 CreateValue(ax_object.ValueDescription()))); |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 | 251 |
| 252 void FillWidgetStates(AXObject& ax_object, | 252 void FillWidgetStates(AXObject& ax_object, |
| 253 protocol::Array<AXProperty>& properties) { | 253 protocol::Array<AXProperty>& properties) { |
| 254 AccessibilityRole role = ax_object.RoleValue(); | 254 AccessibilityRole role = ax_object.RoleValue(); |
| 255 if (RoleAllowsChecked(role)) { | 255 if (RoleAllowsChecked(role)) { |
| 256 AccessibilityButtonState checked = ax_object.CheckboxOrRadioValue(); | 256 AccessibilityButtonState checked = ax_object.CheckedState(); |
| 257 switch (checked) { | 257 switch (checked) { |
| 258 case kButtonStateOff: | 258 case kButtonStateOff: |
| 259 properties.addItem( | 259 properties.addItem( |
| 260 CreateProperty(AXWidgetStatesEnum::Checked, | 260 CreateProperty(AXWidgetStatesEnum::Checked, |
| 261 CreateValue("false", AXValueTypeEnum::Tristate))); | 261 CreateValue("false", AXValueTypeEnum::Tristate))); |
| 262 break; | 262 break; |
| 263 case kButtonStateOn: | 263 case kButtonStateOn: |
| 264 properties.addItem( | 264 properties.addItem( |
| 265 CreateProperty(AXWidgetStatesEnum::Checked, | 265 CreateProperty(AXWidgetStatesEnum::Checked, |
| 266 CreateValue("true", AXValueTypeEnum::Tristate))); | 266 CreateValue("true", AXValueTypeEnum::Tristate))); |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 } | 737 } |
| 738 } | 738 } |
| 739 | 739 |
| 740 DEFINE_TRACE(InspectorAccessibilityAgent) { | 740 DEFINE_TRACE(InspectorAccessibilityAgent) { |
| 741 visitor->Trace(page_); | 741 visitor->Trace(page_); |
| 742 visitor->Trace(dom_agent_); | 742 visitor->Trace(dom_agent_); |
| 743 InspectorBaseAgent::Trace(visitor); | 743 InspectorBaseAgent::Trace(visitor); |
| 744 } | 744 } |
| 745 | 745 |
| 746 } // namespace blink | 746 } // namespace blink |
| OLD | NEW |