Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_win.cc

Issue 2641563003: Relax another case where screen reader support was enabled. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 IAccessible* BrowserAccessibilityManagerWin::GetParentIAccessible() { 84 IAccessible* BrowserAccessibilityManagerWin::GetParentIAccessible() {
85 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager(); 85 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager();
86 if (!delegate) 86 if (!delegate)
87 return NULL; 87 return NULL;
88 return delegate->AccessibilityGetNativeViewAccessible(); 88 return delegate->AccessibilityGetNativeViewAccessible();
89 } 89 }
90 90
91 void BrowserAccessibilityManagerWin::OnIAccessible2Used() { 91 void BrowserAccessibilityManagerWin::OnIAccessible2Used() {
92 BrowserAccessibilityStateImpl::GetInstance()->OnScreenReaderDetected(); 92 // When IAccessible2 APIs have been used elsewhere in the codebase,
93 // enable basic web accessibility support. (Full screen reader support is
94 // detected later when specific more advanced APIs are accessed.)
95 BrowserAccessibilityStateImpl::GetInstance()->AddAccessibilityModeFlags(
96 ACCESSIBILITY_MODE_FLAG_NATIVE_APIS |
97 ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS);
93 } 98 }
94 99
95 void BrowserAccessibilityManagerWin::UserIsReloading() { 100 void BrowserAccessibilityManagerWin::UserIsReloading() {
96 if (GetRoot()) { 101 if (GetRoot()) {
97 (new BrowserAccessibilityEventWin( 102 (new BrowserAccessibilityEventWin(
98 BrowserAccessibilityEvent::FromRenderFrameHost, 103 BrowserAccessibilityEvent::FromRenderFrameHost,
99 ui::AX_EVENT_NONE, 104 ui::AX_EVENT_NONE,
100 IA2_EVENT_DOCUMENT_RELOAD, 105 IA2_EVENT_DOCUMENT_RELOAD,
101 GetRoot()))->Fire(); 106 GetRoot()))->Fire();
102 } 107 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 333
329 void BrowserAccessibilityManagerWin::TrackScrollingObject( 334 void BrowserAccessibilityManagerWin::TrackScrollingObject(
330 BrowserAccessibilityWin* node) { 335 BrowserAccessibilityWin* node) {
331 if (tracked_scroll_object_) 336 if (tracked_scroll_object_)
332 tracked_scroll_object_->Release(); 337 tracked_scroll_object_->Release();
333 tracked_scroll_object_ = node; 338 tracked_scroll_object_ = node;
334 tracked_scroll_object_->AddRef(); 339 tracked_scroll_object_->AddRef();
335 } 340 }
336 341
337 } // namespace content 342 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698