Commit 2484f105 authored by Randy Rossi's avatar Randy Rossi Committed by Commit Bot

Add AccessibilityStateChanged to CastService

Adding an AccessibilityStateChanged method to CastService so
the browser process can notify any out-of-process (non
chrome renderers) that need to know of that state change.
Base implementation does nothing.  ChromecastService will
override this in a subsequent CL.

Bug: None
Change-Id: I4c85d7ec529906d11b9a469bda25d4fadc0ec5f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539790
Commit-Queue: Randy Rossi <rmrossi@chromium.org>
Reviewed-by: default avatarAlex Sakhartchouk <alexst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644434}
parent e06cfd49
......@@ -140,5 +140,10 @@ void CastBrowserProcess::SetWebViewFactory(
web_view_factory_ = web_view_factory;
}
#if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)
void CastBrowserProcess::AccessibilityStateChanged(bool enabled) {
cast_service_->AccessibilityStateChanged(enabled);
}
#endif // BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)
} // namespace shell
} // namespace chromecast
......@@ -59,6 +59,7 @@ class CastBrowserProcess {
void SetAccessibilityManager(
std::unique_ptr<AccessibilityManager> accessibility_manager);
void ClearAccessibilityManager();
void AccessibilityStateChanged(bool enabled);
#endif // BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)
void SetCastScreen(std::unique_ptr<CastScreen> cast_screen);
......
......@@ -51,6 +51,12 @@ void AutomationManagerAura::Enable() {
views::AXAuraObjCache::GetInstance()->GetOrCreate(active_window);
SendEvent(focus, ax::mojom::Event::kChildrenChanged);
}
// Notify the browser process of a change to accessibility state so it
// can notify any out of out of process (non chrome renderers) that need
// to know.
chromecast::shell::CastBrowserProcess::GetInstance()
->AccessibilityStateChanged(true);
}
void AutomationManagerAura::Disable() {
......
......@@ -49,4 +49,8 @@ void CastService::Stop() {
stopped_ = true;
}
void CastService::AccessibilityStateChanged(bool enabled) {
NOTIMPLEMENTED();
}
} // namespace chromecast
......@@ -34,6 +34,9 @@ class CastService {
void Start();
void Stop();
// Notify out-of-process (non-chrome renderers) of accessibility state.
virtual void AccessibilityStateChanged(bool enabled);
protected:
CastService(content::BrowserContext* browser_context,
PrefService* pref_service);
......
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