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

Unified Diff: chrome/renderer/resources/extensions/automation_custom_bindings.js

Issue 2522033002: Generalized fix for serialization error/reset issues (Closed)
Patch Set: Created 4 years, 1 month 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
Index: chrome/renderer/resources/extensions/automation_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/automation_custom_bindings.js b/chrome/renderer/resources/extensions/automation_custom_bindings.js
index 10fd29d0609708f8dee99df03c2d0a9fd36de032..43419ff7ed8e697ee21bc01ffa2211580879936e 100644
--- a/chrome/renderer/resources/extensions/automation_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/automation_custom_bindings.js
@@ -347,6 +347,14 @@ automationInternal.onAccessibilityTreeDestroyed.addListener(function(id) {
DestroyAccessibilityTree(id);
});
+automationInternal.onAccessibilityTreeSerializationError.addListener(function(id) {
dmazzoni 2016/11/22 18:11:42 nit: wrap
David Tseng 2016/11/22 18:26:28 Done.
+ // Possibly clear native focus.
dmazzoni 2016/11/22 18:11:42 Is this necessary? Won't it fix itself when the ne
David Tseng 2016/11/22 18:26:28 Navigation could still occur before then, but like
+ var focusedNodeInfo = GetFocusNative(DESKTOP_TREE_ID);
+ if (focusedNodeInfo && focusedNodeInfo.treeId == id)
+ automationUtil.focusedNode = null;
+ automationInternal.enableFrame(id);
dmazzoni 2016/11/22 18:11:42 Does calling enableFrame() force it to reset? I t
David Tseng 2016/11/22 18:26:28 Let's rename this to enableOrResetFrame (in anothe
+});
+
var binding = automation.generate();
// Add additional accessibility bindings not specified in the automation IDL.
// Accessibility and automation share some APIs (see

Powered by Google App Engine
This is Rietveld 408576698