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

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

Issue 2550593003: Expose media controls to accessibility (Closed)
Patch Set: Expose ducking controls to accessibility Created 4 years 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 53222ab0cfba6779c2a41cc2905f451c77d67ed3..15415a91e00f423eb542c708503f5ea4f2e6dc0e 100644
--- a/chrome/renderer/resources/extensions/automation_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/automation_custom_bindings.js
@@ -278,16 +278,20 @@ automationInternal.onAccessibilityEvent.addListener(function(eventParams) {
var id = eventParams.treeID;
var targetTree = AutomationRootNode.getOrCreate(id);
- // Work around an issue where Chrome sends us 'blur' events on the
- // root node when nothing has focus, we need to treat those as focus
- // events but otherwise not handle blur events specially.
var isFocusEvent = false;
if (eventParams.eventType == schema.EventType.focus) {
isFocusEvent = true;
} else if (eventParams.eventType == schema.EventType.blur) {
+ // Work around an issue where Chrome sends us 'blur' events on the
+ // root node when nothing has focus, we need to treat those as focus
+ // events but otherwise not handle blur events specially.
var node = privates(targetTree).impl.get(eventParams.targetID);
if (node == node.root)
isFocusEvent = true;
+ } else if (eventParams.eventType == schema.EventType.mediaStartedPlaying ||
+ eventParams.eventType == schema.EventType.mediaStoppedPlaying) {
+ // These events are global to the tree.
+ eventParams.targetID = privates(targetTree).impl.id;
}
// When we get a focus event, ignore the actual event target, and instead
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | chromecast/browser/cast_media_blocker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698