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

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

Issue 1884723003: Accessible location change events need to update internal data structure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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.h" 5 #include "content/browser/accessibility/browser_accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 void BrowserAccessibilityManager::OnLocationChanges( 388 void BrowserAccessibilityManager::OnLocationChanges(
389 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { 389 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) {
390 for (size_t i = 0; i < params.size(); ++i) { 390 for (size_t i = 0; i < params.size(); ++i) {
391 BrowserAccessibility* obj = GetFromID(params[i].id); 391 BrowserAccessibility* obj = GetFromID(params[i].id);
392 if (!obj) 392 if (!obj)
393 continue; 393 continue;
394 ui::AXNode* node = obj->node(); 394 ui::AXNode* node = obj->node();
395 node->SetLocation(params[i].new_location); 395 node->SetLocation(params[i].new_location);
396 obj->OnLocationChanged();
397 } 396 }
David Tseng 2016/04/13 22:52:20 I expected a call to SendLocationChangeEvents here
dmazzoni 2016/04/14 18:19:47 Good catch, done.
398 } 397 }
399 398
399 void BrowserAccessibilityManager::SendLocationChangeEvents(
400 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) {
401 for (size_t i = 0; i < params.size(); ++i) {
402 BrowserAccessibility* obj = GetFromID(params[i].id);
403 if (obj)
404 obj->OnLocationChanged();
405 }
406 }
407
400 void BrowserAccessibilityManager::OnFindInPageResult( 408 void BrowserAccessibilityManager::OnFindInPageResult(
401 int request_id, int match_index, int start_id, int start_offset, 409 int request_id, int match_index, int start_id, int start_offset,
402 int end_id, int end_offset) { 410 int end_id, int end_offset) {
403 find_in_page_info_.request_id = request_id; 411 find_in_page_info_.request_id = request_id;
404 find_in_page_info_.match_index = match_index; 412 find_in_page_info_.match_index = match_index;
405 find_in_page_info_.start_id = start_id; 413 find_in_page_info_.start_id = start_id;
406 find_in_page_info_.start_offset = start_offset; 414 find_in_page_info_.start_offset = start_offset;
407 find_in_page_info_.end_id = end_id; 415 find_in_page_info_.end_id = end_id;
408 find_in_page_info_.end_offset = end_offset; 416 find_in_page_info_.end_offset = end_offset;
409 417
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 tree_->CreateTreeSource()); 858 tree_->CreateTreeSource());
851 ui::AXTreeSerializer<const ui::AXNode*, 859 ui::AXTreeSerializer<const ui::AXNode*,
852 ui::AXNodeData, 860 ui::AXNodeData,
853 ui::AXTreeData> serializer(tree_source.get()); 861 ui::AXTreeData> serializer(tree_source.get());
854 ui::AXTreeUpdate update; 862 ui::AXTreeUpdate update;
855 serializer.SerializeChanges(tree_->root(), &update); 863 serializer.SerializeChanges(tree_->root(), &update);
856 return update; 864 return update;
857 } 865 }
858 866
859 } // namespace content 867 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698