| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 return E_FAIL; | 375 return E_FAIL; |
| 376 | 376 |
| 377 if (!def_action) | 377 if (!def_action) |
| 378 return E_INVALIDARG; | 378 return E_INVALIDARG; |
| 379 | 379 |
| 380 BrowserAccessibilityWin* target = GetTargetFromChildID(var_id); | 380 BrowserAccessibilityWin* target = GetTargetFromChildID(var_id); |
| 381 if (!target) | 381 if (!target) |
| 382 return E_INVALIDARG; | 382 return E_INVALIDARG; |
| 383 | 383 |
| 384 return target->GetStringAttributeAsBstr( | 384 return target->GetStringAttributeAsBstr( |
| 385 ui::AX_ATTR_SHORTCUT, def_action); | 385 ui::AX_ATTR_ACTION, def_action); |
| 386 } | 386 } |
| 387 | 387 |
| 388 STDMETHODIMP BrowserAccessibilityWin::get_accDescription(VARIANT var_id, | 388 STDMETHODIMP BrowserAccessibilityWin::get_accDescription(VARIANT var_id, |
| 389 BSTR* desc) { | 389 BSTR* desc) { |
| 390 if (!instance_active()) | 390 if (!instance_active()) |
| 391 return E_FAIL; | 391 return E_FAIL; |
| 392 | 392 |
| 393 if (!desc) | 393 if (!desc) |
| 394 return E_INVALIDARG; | 394 return E_INVALIDARG; |
| 395 | 395 |
| (...skipping 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3893 // The role should always be set. | 3893 // The role should always be set. |
| 3894 DCHECK(!role_name_.empty() || ia_role_); | 3894 DCHECK(!role_name_.empty() || ia_role_); |
| 3895 | 3895 |
| 3896 // If we didn't explicitly set the IAccessible2 role, make it the same | 3896 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3897 // as the MSAA role. | 3897 // as the MSAA role. |
| 3898 if (!ia2_role_) | 3898 if (!ia2_role_) |
| 3899 ia2_role_ = ia_role_; | 3899 ia2_role_ = ia_role_; |
| 3900 } | 3900 } |
| 3901 | 3901 |
| 3902 } // namespace content | 3902 } // namespace content |
| OLD | NEW |