[Live Caption] Turn on and off the live caption feature.
Introduce a caption controller which is a keyed service that belongs
to a single profile. The caption controller will be responsible for
handling the caption feature turning on/off, and piping the text from
the caption service to the UI. The caption controller creates and
destroys the caption bubble controllers.
Introduce a caption bubble controller which is a lightweight controller
of the caption bubble. It is responsible for tasks such as
post-processing of the text that might need to occur before it is
displayed in the bubble, and hiding or showing the caption bubble when
captions are received or the tab changes. There exists one caption
bubble controller per browser window.
Bug: 1055150
Change-Id: I825d47923d07e65c26b46c90e5100328fedc42e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081111
Commit-Queue: Abigail Klein <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Elly Fong-Jones <[email protected]>
Reviewed-by: Dominic Mazzoni <[email protected]>
Cr-Commit-Position: refs/heads/master@{#757104}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index cfe5bce..0f9fba5 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -232,6 +232,7 @@
#include "components/feed/core/common/pref_names.h"
#endif // BUILDFLAG(ENABLE_FEED_IN_CHROME)
#else // defined(OS_ANDROID)
+#include "chrome/browser/accessibility/caption_controller.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/enterprise/reporting/prefs.h"
#include "chrome/browser/gcm/gcm_product_util.h"
@@ -382,7 +383,6 @@
#include "chrome/browser/device_identity//device_oauth2_token_store_desktop.h"
#include "chrome/browser/downgrade/downgrade_prefs.h"
#include "chrome/browser/ui/startup/default_browser_prompt.h"
-
#endif
#if defined(TOOLKIT_VIEWS)
@@ -998,6 +998,7 @@
apps::AppServiceProxy::RegisterProfilePrefs(registry);
AppShortcutManager::RegisterProfilePrefs(registry);
browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
+ captions::CaptionController::RegisterProfilePrefs(registry);
ChromeAuthenticatorRequestDelegate::RegisterProfilePrefs(registry);
DevToolsWindow::RegisterProfilePrefs(registry);
enterprise_reporting::RegisterProfilePrefs(registry);