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

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

Issue 830943004: Improve the notifications sent from AXTree updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback, add missing call to parent class Created 5 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/win/scoped_comptr.h" 8 #include "base/win/scoped_comptr.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 10 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 tracked_scroll_object_ && 256 tracked_scroll_object_ &&
257 tracked_scroll_object_->IsDescendantOf(node)) { 257 tracked_scroll_object_->IsDescendantOf(node)) {
258 MaybeCallNotifyWinEvent( 258 MaybeCallNotifyWinEvent(
259 IA2_EVENT_VISIBLE_DATA_CHANGED, 259 IA2_EVENT_VISIBLE_DATA_CHANGED,
260 tracked_scroll_object_->ToBrowserAccessibilityWin()->unique_id_win()); 260 tracked_scroll_object_->ToBrowserAccessibilityWin()->unique_id_win());
261 tracked_scroll_object_->Release(); 261 tracked_scroll_object_->Release();
262 tracked_scroll_object_ = NULL; 262 tracked_scroll_object_ = NULL;
263 } 263 }
264 } 264 }
265 265
266 void BrowserAccessibilityManagerWin::OnRootChanged(ui::AXNode* new_root) { 266 void BrowserAccessibilityManagerWin::OnAtomicUpdateFinished(
267 // In order to make screen readers aware of the new accessibility root, 267 bool root_changed,
268 // we need to fire a focus event on it. 268 const std::vector<ui::AXTreeDelegate::Change>& changes) {
269 OnWindowFocused(); 269 BrowserAccessibilityManager::OnAtomicUpdateFinished(root_changed, changes);
270
271 if (root_changed) {
272 // In order to make screen readers aware of the new accessibility root,
273 // we need to fire a focus event on it.
274 OnWindowFocused();
275 }
270 } 276 }
271 277
272 void BrowserAccessibilityManagerWin::TrackScrollingObject( 278 void BrowserAccessibilityManagerWin::TrackScrollingObject(
273 BrowserAccessibilityWin* node) { 279 BrowserAccessibilityWin* node) {
274 if (tracked_scroll_object_) 280 if (tracked_scroll_object_)
275 tracked_scroll_object_->Release(); 281 tracked_scroll_object_->Release();
276 tracked_scroll_object_ = node; 282 tracked_scroll_object_ = node;
277 tracked_scroll_object_->AddRef(); 283 tracked_scroll_object_->AddRef();
278 } 284 }
279 285
(...skipping 19 matching lines...) Expand all
299 child_manager->GetFromUniqueIdWin(unique_id_win); 305 child_manager->GetFromUniqueIdWin(unique_id_win);
300 if (result) 306 if (result)
301 return result; 307 return result;
302 } 308 }
303 } 309 }
304 310
305 return NULL; 311 return NULL;
306 } 312 }
307 313
308 } // namespace content 314 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager_win.h ('k') | ui/accessibility/ax_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698