| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/browser/accessibility/browser_accessibility_auralinux.h" | 5 #include "content/browser/accessibility/browser_accessibility_auralinux.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 if (!obj) | 545 if (!obj) |
| 546 return NULL; | 546 return NULL; |
| 547 AtkStateSet* state_set = ATK_OBJECT_CLASS(browser_accessibility_parent_class) | 547 AtkStateSet* state_set = ATK_OBJECT_CLASS(browser_accessibility_parent_class) |
| 548 ->ref_state_set(atk_object); | 548 ->ref_state_set(atk_object); |
| 549 int32_t state = obj->GetState(); | 549 int32_t state = obj->GetState(); |
| 550 | 550 |
| 551 if (state & (1 << ui::AX_STATE_FOCUSABLE)) | 551 if (state & (1 << ui::AX_STATE_FOCUSABLE)) |
| 552 atk_state_set_add_state(state_set, ATK_STATE_FOCUSABLE); | 552 atk_state_set_add_state(state_set, ATK_STATE_FOCUSABLE); |
| 553 if (obj->manager()->GetFocus() == obj) | 553 if (obj->manager()->GetFocus() == obj) |
| 554 atk_state_set_add_state(state_set, ATK_STATE_FOCUSED); | 554 atk_state_set_add_state(state_set, ATK_STATE_FOCUSED); |
| 555 if (state & (1 << ui::AX_STATE_ENABLED)) | 555 if (!(state & (1 << ui::AX_STATE_DISABLED))) |
| 556 atk_state_set_add_state(state_set, ATK_STATE_ENABLED); | 556 atk_state_set_add_state(state_set, ATK_STATE_ENABLED); |
| 557 | 557 |
| 558 return state_set; | 558 return state_set; |
| 559 } | 559 } |
| 560 | 560 |
| 561 static AtkRelationSet* browser_accessibility_ref_relation_set( | 561 static AtkRelationSet* browser_accessibility_ref_relation_set( |
| 562 AtkObject* atk_object) { | 562 AtkObject* atk_object) { |
| 563 AtkRelationSet* relation_set = | 563 AtkRelationSet* relation_set = |
| 564 ATK_OBJECT_CLASS(browser_accessibility_parent_class) | 564 ATK_OBJECT_CLASS(browser_accessibility_parent_class) |
| 565 ->ref_relation_set(atk_object); | 565 ->ref_relation_set(atk_object); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 case ui::AX_ROLE_TREE_ITEM: | 934 case ui::AX_ROLE_TREE_ITEM: |
| 935 atk_role_ = ATK_ROLE_TREE_ITEM; | 935 atk_role_ = ATK_ROLE_TREE_ITEM; |
| 936 break; | 936 break; |
| 937 default: | 937 default: |
| 938 atk_role_ = ATK_ROLE_UNKNOWN; | 938 atk_role_ = ATK_ROLE_UNKNOWN; |
| 939 break; | 939 break; |
| 940 } | 940 } |
| 941 } | 941 } |
| 942 | 942 |
| 943 } // namespace content | 943 } // namespace content |
| OLD | NEW |