| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/renderer/extensions/automation_internal_custom_bindings.h" | 5 #include "chrome/renderer/extensions/automation_internal_custom_bindings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 int tree_id = params.tree_id; | 1183 int tree_id = params.tree_id; |
| 1184 auto iter = tree_id_to_tree_cache_map_.find(tree_id); | 1184 auto iter = tree_id_to_tree_cache_map_.find(tree_id); |
| 1185 if (iter == tree_id_to_tree_cache_map_.end()) | 1185 if (iter == tree_id_to_tree_cache_map_.end()) |
| 1186 return; | 1186 return; |
| 1187 TreeCache* cache = iter->second; | 1187 TreeCache* cache = iter->second; |
| 1188 ui::AXNode* node = cache->tree.GetFromId(params.id); | 1188 ui::AXNode* node = cache->tree.GetFromId(params.id); |
| 1189 if (!node) | 1189 if (!node) |
| 1190 return; | 1190 return; |
| 1191 node->SetLocation(params.new_location.offset_container_id, | 1191 node->SetLocation(params.new_location.offset_container_id, |
| 1192 params.new_location.bounds, | 1192 params.new_location.bounds, |
| 1193 params.new_location.transform.get()); | 1193 params.new_location.transform.get(), |
| 1194 params.new_location.is_fixed_positioned); |
| 1194 } | 1195 } |
| 1195 | 1196 |
| 1196 void AutomationInternalCustomBindings::OnNodeDataWillChange( | 1197 void AutomationInternalCustomBindings::OnNodeDataWillChange( |
| 1197 ui::AXTree* tree, | 1198 ui::AXTree* tree, |
| 1198 const ui::AXNodeData& old_node_data, | 1199 const ui::AXNodeData& old_node_data, |
| 1199 const ui::AXNodeData& new_node_data) { | 1200 const ui::AXNodeData& new_node_data) { |
| 1200 if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) != | 1201 if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) != |
| 1201 new_node_data.GetStringAttribute(ui::AX_ATTR_NAME)) | 1202 new_node_data.GetStringAttribute(ui::AX_ATTR_NAME)) |
| 1202 text_changed_node_ids_.push_back(new_node_data.id); | 1203 text_changed_node_ids_.push_back(new_node_data.id); |
| 1203 } | 1204 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 for (auto id : ids) | 1400 for (auto id : ids) |
| 1400 nodes->AppendInteger(id); | 1401 nodes->AppendInteger(id); |
| 1401 args.Append(std::move(nodes)); | 1402 args.Append(std::move(nodes)); |
| 1402 } | 1403 } |
| 1403 | 1404 |
| 1404 bindings_system_->DispatchEventInContext("automationInternal.onNodesRemoved", | 1405 bindings_system_->DispatchEventInContext("automationInternal.onNodesRemoved", |
| 1405 &args, nullptr, context()); | 1406 &args, nullptr, context()); |
| 1406 } | 1407 } |
| 1407 | 1408 |
| 1408 } // namespace extensions | 1409 } // namespace extensions |
| OLD | NEW |