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

Unified Diff: chrome/renderer/extensions/automation_internal_custom_bindings.cc

Issue 2255093005: Pass accessible location change messages to the automation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative fix to cast_shell Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/automation_internal_custom_bindings.cc
diff --git a/chrome/renderer/extensions/automation_internal_custom_bindings.cc b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
index 301e74d0258b6dea7baf89b6ad313f9487ace277..6fc8560df45170bede51497bc66601b52b015bcf 100644
--- a/chrome/renderer/extensions/automation_internal_custom_bindings.cc
+++ b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
@@ -685,6 +685,8 @@ void AutomationInternalCustomBindings::OnMessageReceived(
const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(AutomationInternalCustomBindings, message)
IPC_MESSAGE_HANDLER(ExtensionMsg_AccessibilityEvent, OnAccessibilityEvent)
+ IPC_MESSAGE_HANDLER(ExtensionMsg_AccessibilityLocationChange,
+ OnAccessibilityLocationChange)
IPC_END_MESSAGE_MAP()
}
@@ -1126,6 +1128,21 @@ void AutomationInternalCustomBindings::OnAccessibilityEvent(
context()->DispatchEvent("automationInternal.onAccessibilityEvent", args);
}
+void AutomationInternalCustomBindings::OnAccessibilityLocationChange(
+ const ExtensionMsg_AccessibilityLocationChangeParams& params) {
+ int tree_id = params.tree_id;
+ auto iter = tree_id_to_tree_cache_map_.find(tree_id);
+ if (iter == tree_id_to_tree_cache_map_.end())
+ return;
+ TreeCache* cache = iter->second;
+ ui::AXNode* node = cache->tree.GetFromId(params.id);
+ if (!node)
+ return;
+ node->SetLocation(params.new_location.offset_container_id,
+ params.new_location.bounds,
+ params.new_location.transform.get());
+}
+
void AutomationInternalCustomBindings::OnNodeDataWillChange(
ui::AXTree* tree,
const ui::AXNodeData& old_node_data,
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698