OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_win.h" |
6 | 6 |
7 #include <UIAutomationClient.h> | 7 #include <UIAutomationClient.h> |
8 #include <UIAutomationCoreApi.h> | 8 #include <UIAutomationCoreApi.h> |
9 | 9 |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3208 // Fire an event if the name, description, help, or value changes. | 3208 // Fire an event if the name, description, help, or value changes. |
3209 if (!is_new_object) { | 3209 if (!is_new_object) { |
3210 if (name != old_win_attributes_->name) | 3210 if (name != old_win_attributes_->name) |
3211 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_NAMECHANGE, this); | 3211 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_NAMECHANGE, this); |
3212 if (description != old_win_attributes_->description) | 3212 if (description != old_win_attributes_->description) |
3213 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_DESCRIPTIONCHANGE, this); | 3213 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_DESCRIPTIONCHANGE, this); |
3214 if (help != old_win_attributes_->help) | 3214 if (help != old_win_attributes_->help) |
3215 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_HELPCHANGE, this); | 3215 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_HELPCHANGE, this); |
3216 if (value != old_win_attributes_->value) | 3216 if (value != old_win_attributes_->value) |
3217 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_VALUECHANGE, this); | 3217 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_VALUECHANGE, this); |
3218 if (ia_state() != old_win_attributes_->ia_state) | 3218 if (ia_state() != old_win_attributes_->ia_state) { |
| 3219 LOG(INFO) << "State change:" |
| 3220 << " from " << old_win_attributes_->ia_state |
| 3221 << " to " << ia_state(); |
3219 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_STATECHANGE, this); | 3222 manager->MaybeCallNotifyWinEvent(EVENT_OBJECT_STATECHANGE, this); |
| 3223 } |
3220 | 3224 |
3221 // Normally focus events are handled elsewhere, however | 3225 // Normally focus events are handled elsewhere, however |
3222 // focus for managed descendants is platform-specific. | 3226 // focus for managed descendants is platform-specific. |
3223 // Fire a focus event if the focused descendant in a multi-select | 3227 // Fire a focus event if the focused descendant in a multi-select |
3224 // list box changes. | 3228 // list box changes. |
3225 if (GetRole() == ui::AX_ROLE_LIST_BOX_OPTION && | 3229 if (GetRole() == ui::AX_ROLE_LIST_BOX_OPTION && |
3226 (ia_state() & STATE_SYSTEM_FOCUSABLE) && | 3230 (ia_state() & STATE_SYSTEM_FOCUSABLE) && |
3227 (ia_state() & STATE_SYSTEM_SELECTABLE) && | 3231 (ia_state() & STATE_SYSTEM_SELECTABLE) && |
3228 (ia_state() & STATE_SYSTEM_FOCUSED) && | 3232 (ia_state() & STATE_SYSTEM_FOCUSED) && |
3229 !(old_win_attributes_->ia_state & STATE_SYSTEM_FOCUSED)) { | 3233 !(old_win_attributes_->ia_state & STATE_SYSTEM_FOCUSED)) { |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4040 ia2_role = ia_role; | 4044 ia2_role = ia_role; |
4041 | 4045 |
4042 win_attributes_->ia_role = ia_role; | 4046 win_attributes_->ia_role = ia_role; |
4043 win_attributes_->ia_state = ia_state; | 4047 win_attributes_->ia_state = ia_state; |
4044 win_attributes_->role_name = role_name; | 4048 win_attributes_->role_name = role_name; |
4045 win_attributes_->ia2_role = ia2_role; | 4049 win_attributes_->ia2_role = ia2_role; |
4046 win_attributes_->ia2_state = ia2_state; | 4050 win_attributes_->ia2_state = ia2_state; |
4047 } | 4051 } |
4048 | 4052 |
4049 } // namespace content | 4053 } // namespace content |
OLD | NEW |