summaryrefslogtreecommitdiff
path: root/chromium/content/utility
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/utility')
-rw-r--r--chromium/content/utility/BUILD.gn5
-rw-r--r--chromium/content/utility/DEPS1
-rw-r--r--chromium/content/utility/services.cc2
-rw-r--r--chromium/content/utility/utility_main.cc8
4 files changed, 15 insertions, 1 deletions
diff --git a/chromium/content/utility/BUILD.gn b/chromium/content/utility/BUILD.gn
index 5f891b017a2..1b4d1dce954 100644
--- a/chromium/content/utility/BUILD.gn
+++ b/chromium/content/utility/BUILD.gn
@@ -74,7 +74,10 @@ jumbo_source_set("utility") {
}
if (is_chromeos) {
- deps += [ "//chromeos/services/ime:sandbox_hook" ]
+ deps += [
+ "//chromeos/services/ime:sandbox_hook",
+ "//chromeos/services/tts:sandbox_hook",
+ ]
}
# PAC execution is done in process on Android.
diff --git a/chromium/content/utility/DEPS b/chromium/content/utility/DEPS
index ab7b7cfdca3..ea50762a0ba 100644
--- a/chromium/content/utility/DEPS
+++ b/chromium/content/utility/DEPS
@@ -4,6 +4,7 @@ include_rules = [
"+content/public/utility",
"+content/services/isolated_xr_device",
"+chromeos/services/ime",
+ "+chromeos/services/tts",
"+device/vr/buildflags",
"+device/vr/public",
"+services/audio",
diff --git a/chromium/content/utility/services.cc b/chromium/content/utility/services.cc
index d27de48acad..4a49a840b2d 100644
--- a/chromium/content/utility/services.cc
+++ b/chromium/content/utility/services.cc
@@ -194,6 +194,8 @@ auto RunXrDeviceService(
mojo::ServiceFactory& GetIOThreadServiceFactory() {
static base::NoDestructor<mojo::ServiceFactory> factory{
+ // The network service runs on the IO thread because it needs a message
+ // loop of type IO that can get notified when pipes have data.
RunNetworkService,
};
return *factory;
diff --git a/chromium/content/utility/utility_main.cc b/chromium/content/utility/utility_main.cc
index 58372b4a2cc..f5bdb79ce99 100644
--- a/chromium/content/utility/utility_main.cc
+++ b/chromium/content/utility/utility_main.cc
@@ -15,9 +15,11 @@
#include "build/build_config.h"
#include "content/child/child_process.h"
#include "content/common/content_switches_internal.h"
+#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/sandbox_init.h"
+#include "content/public/utility/content_utility_client.h"
#include "content/utility/utility_thread_impl.h"
#include "services/service_manager/sandbox/sandbox.h"
#include "services/tracing/public/cpp/trace_startup.h"
@@ -31,6 +33,7 @@
#if defined(OS_CHROMEOS)
#include "chromeos/services/ime/ime_sandbox_hook.h"
+#include "chromeos/services/tts/tts_sandbox_hook.h"
#endif
#if defined(OS_MACOSX)
@@ -89,6 +92,7 @@ int UtilityMain(const MainFunctionParams& parameters) {
sandbox_type == service_manager::SandboxType::kNetwork ||
#if defined(OS_CHROMEOS)
sandbox_type == service_manager::SandboxType::kIme ||
+ sandbox_type == service_manager::SandboxType::kTts ||
#endif // OS_CHROMEOS
sandbox_type == service_manager::SandboxType::kAudio ||
sandbox_type == service_manager::SandboxType::kSpeechRecognition) {
@@ -103,6 +107,8 @@ int UtilityMain(const MainFunctionParams& parameters) {
#if defined(OS_CHROMEOS)
else if (sandbox_type == service_manager::SandboxType::kIme)
pre_sandbox_hook = base::BindOnce(&chromeos::ime::ImePreSandboxHook);
+ else if (sandbox_type == service_manager::SandboxType::kTts)
+ pre_sandbox_hook = base::BindOnce(&chromeos::tts::TtsPreSandboxHook);
#endif // OS_CHROMEOS
service_manager::Sandbox::Initialize(
@@ -114,6 +120,8 @@ int UtilityMain(const MainFunctionParams& parameters) {
#endif
ChildProcess utility_process;
+ GetContentClient()->utility()->PostIOThreadCreated(
+ utility_process.io_task_runner());
base::RunLoop run_loop;
utility_process.set_main_thread(
new UtilityThreadImpl(run_loop.QuitClosure()));