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

Side by Side Diff: chrome/renderer/extensions/automation_internal_custom_bindings.cc

Issue 2917363002: Automatically fire AX events on Mac based on tree changes (Closed)
Patch Set: Fix accidental shadowing of BrowserAccessibilityManager::OnAtomicUpdateFinished, caught by browser … Created 3 years, 6 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 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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 1235
1236 void AutomationInternalCustomBindings::OnNodeDataWillChange( 1236 void AutomationInternalCustomBindings::OnNodeDataWillChange(
1237 ui::AXTree* tree, 1237 ui::AXTree* tree,
1238 const ui::AXNodeData& old_node_data, 1238 const ui::AXNodeData& old_node_data,
1239 const ui::AXNodeData& new_node_data) { 1239 const ui::AXNodeData& new_node_data) {
1240 if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) != 1240 if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) !=
1241 new_node_data.GetStringAttribute(ui::AX_ATTR_NAME)) 1241 new_node_data.GetStringAttribute(ui::AX_ATTR_NAME))
1242 text_changed_node_ids_.push_back(new_node_data.id); 1242 text_changed_node_ids_.push_back(new_node_data.id);
1243 } 1243 }
1244 1244
1245 void AutomationInternalCustomBindings::OnTreeDataChanged(ui::AXTree* tree) {} 1245 void AutomationInternalCustomBindings::OnTreeDataChanged(
1246 ui::AXTree* tree,
1247 const ui::AXTreeData& old_tree_data,
1248 const ui::AXTreeData& new_tree_data) {}
1246 1249
1247 void AutomationInternalCustomBindings::OnNodeWillBeDeleted(ui::AXTree* tree, 1250 void AutomationInternalCustomBindings::OnNodeWillBeDeleted(ui::AXTree* tree,
1248 ui::AXNode* node) { 1251 ui::AXNode* node) {
1249 SendTreeChangeEvent( 1252 SendTreeChangeEvent(
1250 api::automation::TREE_CHANGE_TYPE_NODEREMOVED, 1253 api::automation::TREE_CHANGE_TYPE_NODEREMOVED,
1251 tree, node); 1254 tree, node);
1252 deleted_node_ids_.push_back(node->id()); 1255 deleted_node_ids_.push_back(node->id());
1253 } 1256 }
1254 1257
1255 void AutomationInternalCustomBindings::OnSubtreeWillBeDeleted( 1258 void AutomationInternalCustomBindings::OnSubtreeWillBeDeleted(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 for (auto id : ids) 1439 for (auto id : ids)
1437 nodes->AppendInteger(id); 1440 nodes->AppendInteger(id);
1438 args.Append(std::move(nodes)); 1441 args.Append(std::move(nodes));
1439 } 1442 }
1440 1443
1441 bindings_system_->DispatchEventInContext("automationInternal.onNodesRemoved", 1444 bindings_system_->DispatchEventInContext("automationInternal.onNodesRemoved",
1442 &args, nullptr, context()); 1445 &args, nullptr, context());
1443 } 1446 }
1444 1447
1445 } // namespace extensions 1448 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698