Commit dbee407c authored by Abigail Klein's avatar Abigail Klein Committed by Chromium LUCI CQ

[Live Caption] Trigger captions_handler to start observing soda

installation events from a11y page.

While Linux, ChromeOS, and early versions of Windows do not have their
own captions settings so Chrome introduced our own, MacOS and later
versions of Windows have their own captions settings which open
externally. In the former case, the Live Caption toggle exists on
captions_subpage.html, while in the latter case, the toggle exists on
a11y_page.html--but both use the same captions_handler webui to observe
the soda installation.

This CL fixes a bug where the soda installation was not being observed
in the latter case. The previous assumption was that allowing javascript
on one webui page allowed it on all pages--but that is apparently not
the case. This CL explicitly allows javascript on the captions_handler
from a11y_page.js.

Bug: 1055150, 1156247
Change-Id: I54ab7e3207459d4c1e56e2da65361a6725b522c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601230Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Abigail Klein <abigailbklein@google.com>
Cr-Commit-Position: refs/heads/master@{#840266}
parent 82c6bc8e
...@@ -142,6 +142,13 @@ Polymer({ ...@@ -142,6 +142,13 @@ Polymer({
// Enables javascript and gets the screen reader state. // Enables javascript and gets the screen reader state.
chrome.send('a11yPageReady'); chrome.send('a11yPageReady');
if (this.captionSettingsOpensExternally_) {
// If captions settings open externally, then this page doesn't have a
// separate captions subpage. Send a captionsSubpageReady notification in
// order to start observing SODA events.
chrome.send('captionsSubpageReady');
}
}, },
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment