| 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_manager_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (!delegate) | 80 if (!delegate) |
| 81 return NULL; | 81 return NULL; |
| 82 return delegate->AccessibilityGetNativeViewAccessible(); | 82 return delegate->AccessibilityGetNativeViewAccessible(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void BrowserAccessibilityManagerWin::OnIAccessible2Used() { | 85 void BrowserAccessibilityManagerWin::OnIAccessible2Used() { |
| 86 // When IAccessible2 APIs have been used elsewhere in the codebase, | 86 // When IAccessible2 APIs have been used elsewhere in the codebase, |
| 87 // enable basic web accessibility support. (Full screen reader support is | 87 // enable basic web accessibility support. (Full screen reader support is |
| 88 // detected later when specific more advanced APIs are accessed.) | 88 // detected later when specific more advanced APIs are accessed.) |
| 89 BrowserAccessibilityStateImpl::GetInstance()->AddAccessibilityModeFlags( | 89 BrowserAccessibilityStateImpl::GetInstance()->AddAccessibilityModeFlags( |
| 90 ACCESSIBILITY_MODE_FLAG_NATIVE_APIS | | 90 AccessibilityMode::kNativeAPIs | AccessibilityMode::kWebContents); |
| 91 ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS); | |
| 92 } | 91 } |
| 93 | 92 |
| 94 void BrowserAccessibilityManagerWin::UserIsReloading() { | 93 void BrowserAccessibilityManagerWin::UserIsReloading() { |
| 95 if (GetRoot()) { | 94 if (GetRoot()) { |
| 96 (new BrowserAccessibilityEventWin( | 95 (new BrowserAccessibilityEventWin( |
| 97 BrowserAccessibilityEvent::FromRenderFrameHost, | 96 BrowserAccessibilityEvent::FromRenderFrameHost, |
| 98 ui::AX_EVENT_NONE, | 97 ui::AX_EVENT_NONE, |
| 99 IA2_EVENT_DOCUMENT_RELOAD, | 98 IA2_EVENT_DOCUMENT_RELOAD, |
| 100 GetRoot()))->Fire(); | 99 GetRoot()))->Fire(); |
| 101 } | 100 } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 DCHECK(changed_node); | 287 DCHECK(changed_node); |
| 289 BrowserAccessibility* obj = GetFromAXNode(changed_node); | 288 BrowserAccessibility* obj = GetFromAXNode(changed_node); |
| 290 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { | 289 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { |
| 291 ToBrowserAccessibilityWin(obj)->UpdateStep3FireEvents( | 290 ToBrowserAccessibilityWin(obj)->UpdateStep3FireEvents( |
| 292 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); | 291 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); |
| 293 } | 292 } |
| 294 } | 293 } |
| 295 } | 294 } |
| 296 | 295 |
| 297 } // namespace content | 296 } // namespace content |
| OLD | NEW |