forked from pool/nodejs-electron
- Update to 25.8.0
* ABI break: NODE_MODULE_VERSION is now 116
* Chromium 114.0.5735.289
* Node 18.15.0
* V8 11.4
* Removed BrowserWindow scroll-touch-* events (since Electron 23)
* Removed webContents.{de,in}crementCapturerCount(stayHidden, stayAwake) (since Electron 23)
* Removed JXL image format support (since Electron 23)
* API Changed: nativeImage.createThumbnailFromPath(path, size) (since Electron 24)
- Use bundled vpx on Fedora ≤37 and Leap
- Use bundled aom on Fedora and Leap
- Drop support for Fedora 36 which is EOL
- Drop upstreamed patches
* CVE-2022-43548.patch
* aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch
* angle-ShaderVars-missing-uint32_t.patch
* blink-gcc13-missing-headers.patch
* bluetooth_uuid-missing-uint8_t.patch
* broker_file_permission-missing-uint64_t.patch
* chromium-108-abseil-shims.patch
* components-gcc13-missing-headers.patch
* crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch
* d0aa9ad.patch
* document_loader-private-DecodedBodyData.patch
* effect_paint_property_node-Wchanges-meaning.patch
* electron_serial_delegate-ambiguous-Observer.patch
* extensions-gcc13-missing-headers.patch
* first_party_set_parser-IssueWithMetadata-no-known-conversion.patch
* gpu_feature_info-missing-uint32_t.patch
* half_float-Wstrict-aliasing.patch
* ipcz-buffer_id-Wnarrowing.patch
* ipcz-safe_math-Wuninitialized.patch
* net-gcc13-missing-headers.patch
* net-third_party-quiche-gcc13-missing-headers.patch
* one_writer_seqlock-missing-uintptr_t.patch
* openscreen-gcc13-missing-headers.patch
* passwords_counter-Wsubobject-linkage.patch
* perfetto-uuid-missing-uint8_t.patch
* print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch
* profiler-missing-uintptr_t.patch
* reproducible-config.gypi.patch
* select_file_dialog_linux_kde-Wodr.patch
* shim_headers-fix-ninja.patch
* static_constructors-Wstrict-aliasing.patch
* string_hasher-type-pun-UB-causes-heap-corruption.patch
* swiftshader-Constants-Wstrict-aliasing.patch
* swiftshader-Half-Wstrict-aliasing.patch
* swiftshader-LRUCache-missing-uint64_t.patch
* target_property-missing-uint32_t.patch
* ui-gcc13-missing-headers.patch
* unzip-Wsubobject-linkage.patch
* v8_initializer-PageAllocator-fpermissive.patch
* vector_math_impl-Wstrict-aliasing.patch
* web_contents_impl-Wsubobject-linkage.patch
* webgl_image_conversion-Wstrict-aliasing.patch
* webrtc-base64-missing-uint8_t.patch
* xr_cube_map-Wstrict-aliasing.patch
- Drop no longer relevant patches`
* chromium-norar.patch
* electron-13-fix-sql-virtualcursor-type.patch
* enable-jxl.patch
* system-jsoncpp.patch
- Add patches to build with system libs
* abseil-remove-unused-targets.patch
* highway.gn
* system-wayland.patch
- Add patches to fix build errors
* absl-uint128-do-not-assume-abi.patch
* cpu-missing-uint8_t.patch
* electron-24-components-missing-headers.patch
* electron_api_app-GetPathConstant-non-constexpr.patch
* electron_browser_context-missing-variant.patch
* mojo_ukm_recorder-missing-WrapUnique.patch
- Conditionally reverse upstream changes to build against stable avif
* avif_image_decoder-repetitionCount-clli.patch
- …and harfbuzz 4
* harfbuzz-replace-HbScopedPointer.patch
- …and icu 69
* v8-regexp-parser-UCHAR_BASIC_EMOJI.patch
- …and wayland 19
* wayland-WL-SINCE-VERSION.patch
* wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch
- Add backported chrome-gpu-does-not-load.patch
OBS-URL: https://build.opensuse.org/request/show/1110783
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=89
292 lines
12 KiB
Diff
292 lines
12 KiB
Diff
From d617766b236a93749ddbb50b75573dd35238ffc9 Mon Sep 17 00:00:00 2001
|
|
From: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
|
|
Date: Fri, 29 Jan 2016 14:20:48 +0100
|
|
Subject: Fix building without WebSpeech
|
|
|
|
WebSpeech requires Google API keys, so we do not support it, and
|
|
disabling it also gets rid of libspeex and libFLAC.
|
|
|
|
Also splits speech recognition from speech synthesis, so we can
|
|
disable the former without disabling the latter.
|
|
|
|
Change-Id: I80a54ec4c6a13ea4c443289aa42369196c2e095a
|
|
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
---
|
|
chromium/content/browser/BUILD.gn | 56 ++++++++++++----------
|
|
.../content/browser/browser_interface_binders.cc | 10 ++++
|
|
chromium/content/browser/browser_main_loop.cc | 7 ++-
|
|
chromium/content/browser/browser_main_loop.h | 2 +
|
|
chromium/content/child/runtime_features.cc | 1 -
|
|
chromium/media/BUILD.gn | 1 +
|
|
chromium/media/media_options.gni | 2 +
|
|
7 files changed, 52 insertions(+), 27 deletions(-)
|
|
|
|
diff --git a/chromium/content/browser/BUILD.gn b/chromium/content/browser/BUILD.gn
|
|
index 19b45dc1268..67dcd7752d0 100644
|
|
--- a/content/browser/BUILD.gn
|
|
+++ b/content/browser/BUILD.gn
|
|
@@ -1909,11 +1909,6 @@ source_set("browser") {
|
|
"sms/user_consent_handler.h",
|
|
"sms/webotp_service.cc",
|
|
"sms/webotp_service.h",
|
|
- "speech/speech_recognition_dispatcher_host.cc",
|
|
- "speech/speech_recognition_dispatcher_host.h",
|
|
- "speech/speech_recognition_manager_impl.cc",
|
|
- "speech/speech_recognition_manager_impl.h",
|
|
- "speech/speech_recognizer.h",
|
|
"speech/speech_synthesis_impl.cc",
|
|
"speech/speech_synthesis_impl.h",
|
|
"speech/tts_controller_impl.cc",
|
|
@@ -2956,17 +2951,6 @@ source_set("browser") {
|
|
"serial/serial_service.cc",
|
|
"serial/serial_service.h",
|
|
|
|
- # Most speech code is non-Android.
|
|
- "speech/endpointer/endpointer.cc",
|
|
- "speech/endpointer/endpointer.h",
|
|
- "speech/endpointer/energy_endpointer.cc",
|
|
- "speech/endpointer/energy_endpointer.h",
|
|
- "speech/endpointer/energy_endpointer_params.cc",
|
|
- "speech/endpointer/energy_endpointer_params.h",
|
|
- "speech/speech_recognition_engine.cc",
|
|
- "speech/speech_recognition_engine.h",
|
|
- "speech/speech_recognizer_impl.cc",
|
|
- "speech/speech_recognizer_impl.h",
|
|
"tracing/tracing_ui.cc",
|
|
"tracing/tracing_ui.h",
|
|
|
|
@@ -2995,7 +2975,6 @@ source_set("browser") {
|
|
]
|
|
|
|
deps += [
|
|
- "//components/speech:speech",
|
|
"//components/vector_icons",
|
|
]
|
|
}
|
|
@@ -3108,6 +3083,37 @@ source_set("browser") {
|
|
deps += [ "//ui/compositor" ]
|
|
}
|
|
|
|
+ if (enable_web_speech) {
|
|
+ sources += [
|
|
+ "speech/audio_buffer.cc",
|
|
+ "speech/audio_buffer.h",
|
|
+ "speech/audio_encoder.cc",
|
|
+ "speech/audio_encoder.h",
|
|
+ "speech/chunked_byte_buffer.cc",
|
|
+ "speech/chunked_byte_buffer.h",
|
|
+ "speech/endpointer/endpointer.cc",
|
|
+ "speech/endpointer/endpointer.h",
|
|
+ "speech/endpointer/energy_endpointer.cc",
|
|
+ "speech/endpointer/energy_endpointer.h",
|
|
+ "speech/endpointer/energy_endpointer_params.cc",
|
|
+ "speech/endpointer/energy_endpointer_params.h",
|
|
+ "speech/speech_recognition_engine.cc",
|
|
+ "speech/speech_recognition_engine.h",
|
|
+ "speech/speech_recognizer_impl.cc",
|
|
+ "speech/speech_recognizer_impl.h",
|
|
+ "speech/speech_recognition_dispatcher_host.cc",
|
|
+ "speech/speech_recognition_dispatcher_host.h",
|
|
+ "speech/speech_recognition_manager_impl.cc",
|
|
+ "speech/speech_recognition_manager_impl.h",
|
|
+ "speech/speech_recognizer.h",
|
|
+ ]
|
|
+ deps += [
|
|
+ "//components/speech",
|
|
+ "//content/browser/speech/proto",
|
|
+ "//third_party/flac",
|
|
+ ]
|
|
+ }
|
|
+
|
|
if ((is_linux || is_chromeos) && use_dbus) {
|
|
deps += [ "//dbus" ]
|
|
}
|
|
diff --git a/chromium/content/browser/browser_interface_binders.cc b/chromium/content/browser/browser_interface_binders.cc
|
|
index c5a6f0aea88..71d9bf41a71 100644
|
|
--- a/content/browser/browser_interface_binders.cc
|
|
+++ b/content/browser/browser_interface_binders.cc
|
|
@@ -50,7 +50,9 @@
|
|
#include "content/browser/renderer_host/render_frame_host_impl.h"
|
|
#include "content/browser/renderer_host/render_process_host_impl.h"
|
|
#include "content/browser/service_worker/service_worker_host.h"
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
#include "content/browser/speech/speech_recognition_dispatcher_host.h"
|
|
+#endif
|
|
#include "content/browser/wake_lock/wake_lock_service_impl.h"
|
|
#include "content/browser/web_contents/file_chooser_impl.h"
|
|
#include "content/browser/web_contents/web_contents_impl.h"
|
|
@@ -144,7 +146,9 @@
|
|
#include "third_party/blink/public/mojom/runtime_feature_state/runtime_feature_state_controller.mojom.h"
|
|
#include "third_party/blink/public/mojom/sms/webotp_service.mojom.h"
|
|
#include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h"
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
#include "third_party/blink/public/mojom/speech/speech_recognizer.mojom.h"
|
|
+#endif
|
|
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom.h"
|
|
#include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h"
|
|
#include "third_party/blink/public/mojom/wake_lock/wake_lock.mojom.h"
|
|
@@ -168,7 +172,9 @@
|
|
#else // BUILDFLAG(IS_ANDROID)
|
|
#include "content/browser/direct_sockets/direct_sockets_service_impl.h"
|
|
#include "media/mojo/mojom/renderer_extensions.mojom.h"
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
#include "media/mojo/mojom/speech_recognition.mojom.h" // nogncheck
|
|
+#endif
|
|
#include "third_party/blink/public/mojom/hid/hid.mojom.h"
|
|
#include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h"
|
|
#include "third_party/blink/public/mojom/serial/serial.mojom.h"
|
|
@@ -830,10 +836,12 @@ void PopulateFrameBinders(RenderFrameHostImpl* host, mojo::BinderMap* map) {
|
|
map->Add<blink::mojom::SharedWorkerConnector>(
|
|
base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host)));
|
|
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
map->Add<blink::mojom::SpeechRecognizer>(
|
|
base::BindRepeating(&SpeechRecognitionDispatcherHost::Create,
|
|
host->GetProcess()->GetID(), host->GetRoutingID()),
|
|
GetIOThreadTaskRunner({}));
|
|
+#endif
|
|
|
|
map->Add<blink::mojom::SpeechSynthesis>(base::BindRepeating(
|
|
&RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host)));
|
|
@@ -1099,6 +1107,7 @@ void PopulateBinderMapWithContext(
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
map->Add<blink::mojom::DirectSocketsService>(
|
|
base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame));
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
map->Add<media::mojom::SpeechRecognitionContext>(base::BindRepeating(
|
|
&EmptyBinderForFrame<media::mojom::SpeechRecognitionContext>));
|
|
map->Add<media::mojom::SpeechRecognitionClientBrowserInterface>(
|
|
@@ -1110,6 +1119,7 @@ void PopulateBinderMapWithContext(
|
|
map->Add<media::mojom::MediaPlayerObserverClient>(base::BindRepeating(
|
|
&EmptyBinderForFrame<media::mojom::MediaPlayerObserverClient>));
|
|
#endif
|
|
+#endif
|
|
#if BUILDFLAG(ENABLE_UNHANDLED_TAP)
|
|
map->Add<blink::mojom::UnhandledTapNotifier>(base::BindRepeating(
|
|
&EmptyBinderForFrame<blink::mojom::UnhandledTapNotifier>));
|
|
diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc
|
|
index aaa752bec61..b3a1ed50d20 100644
|
|
--- a/content/browser/browser_main_loop.cc
|
|
+++ b/content/browser/browser_main_loop.cc
|
|
@@ -87,7 +87,9 @@
|
|
#include "content/browser/screenlock_monitor/screenlock_monitor.h"
|
|
#include "content/browser/screenlock_monitor/screenlock_monitor_device_source.h"
|
|
#include "content/browser/sms/sms_provider.h"
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
#include "content/browser/speech/speech_recognition_manager_impl.h"
|
|
+#endif
|
|
#include "content/browser/speech/tts_controller_impl.h"
|
|
#include "content/browser/startup_data_impl.h"
|
|
#include "content/browser/startup_task_runner.h"
|
|
@@ -1114,12 +1116,14 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
|
midi_service_->Shutdown();
|
|
}
|
|
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
{
|
|
TRACE_EVENT0("shutdown",
|
|
"BrowserMainLoop::Subsystem:SpeechRecognitionManager");
|
|
io_thread_->task_runner()->DeleteSoon(
|
|
FROM_HERE, speech_recognition_manager_.release());
|
|
}
|
|
+#endif
|
|
|
|
TtsControllerImpl::GetInstance()->Shutdown();
|
|
|
|
@@ -1364,13 +1368,14 @@ void BrowserMainLoop::PostCreateThreadsImpl() {
|
|
media_stream_manager_ =
|
|
std::make_unique<MediaStreamManager>(audio_system_.get());
|
|
}
|
|
-
|
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
|
{
|
|
TRACE_EVENT0("startup",
|
|
"BrowserMainLoop::PostCreateThreads:InitSpeechRecognition");
|
|
speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl(
|
|
audio_system_.get(), media_stream_manager_.get()));
|
|
}
|
|
+#endif
|
|
|
|
{
|
|
TRACE_EVENT0("startup",
|
|
diff --git a/chromium/content/browser/browser_main_loop.h b/chromium/content/browser/browser_main_loop.h
|
|
index a8c8c6b5d16..7d92e0a701e 100644
|
|
--- a/content/browser/browser_main_loop.h
|
|
+++ b/content/browser/browser_main_loop.h
|
|
@@ -367,8 +367,10 @@ class CONTENT_EXPORT BrowserMainLoop {
|
|
|
|
std::unique_ptr<midi::MidiService> midi_service_;
|
|
|
|
+#if defined(ENABLE_WEB_SPEECH)
|
|
// Must be deleted on the IO thread.
|
|
std::unique_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_;
|
|
+#endif
|
|
|
|
#if BUILDFLAG(IS_WIN)
|
|
std::unique_ptr<media::SystemMessageWindowWin> system_message_window_;
|
|
diff --git a/chromium/content/child/runtime_features.cc b/chromium/content/child/runtime_features.cc
|
|
index 3a2e713ccc3..6af5afde20e 100644
|
|
--- a/content/child/runtime_features.cc
|
|
+++ b/content/child/runtime_features.cc
|
|
@@ -465,7 +465,6 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) {
|
|
{wrf::EnablePushMessaging, switches::kDisableNotifications, false},
|
|
{wrf::EnableScriptedSpeechRecognition, switches::kDisableSpeechAPI,
|
|
false},
|
|
- {wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechAPI, false},
|
|
{wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechSynthesisAPI,
|
|
false},
|
|
{wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false},
|
|
diff --git a/chromium/media/BUILD.gn b/chromium/media/BUILD.gn
|
|
index 01e0910666e..6ce78127e3f 100644
|
|
--- a/media/BUILD.gn
|
|
+++ b/media/BUILD.gn
|
|
@@ -47,6 +47,7 @@ buildflag_header("media_buildflags") {
|
|
"ENABLE_PLATFORM_MPEG_H_AUDIO=$enable_platform_mpeg_h_audio",
|
|
"ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser",
|
|
"PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT=$platform_has_optional_hevc_support",
|
|
+ "ENABLE_WEB_SPEECH=$enable_web_speech",
|
|
"USE_ARC_PROTECTED_MEDIA=$use_arc_protected_media",
|
|
"USE_CHROMEOS_MEDIA_ACCELERATION=$use_vaapi||$use_v4l2_codec",
|
|
"USE_CHROMEOS_PROTECTED_AV1=$use_chromeos_protected_av1",
|
|
diff --git a/chromium/media/media_options.gni b/chromium/media/media_options.gni
|
|
index 5667cac61f3..48ea95a99a6 100644
|
|
--- a/media/media_options.gni
|
|
+++ b/media/media_options.gni
|
|
@@ -66,6 +66,8 @@ declare_args() {
|
|
# kAllowClearDolbyVisionInMseWhenPlatformEncryptedDvEnabled.
|
|
enable_platform_encrypted_dolby_vision = proprietary_codecs && is_win
|
|
|
|
+ enable_web_speech = true
|
|
+
|
|
# Enable logging override, e.g. enable DVLOGs through level 2 at build time.
|
|
# On Cast devices, these are logged as INFO.
|
|
# When enabled on Fuchsia, these are logged as VLOGs.
|
|
--
|
|
cgit v1.2.1
|
|
|
|
|
|
--- src/components/speech/BUILD.gn.old 2023-05-13 15:23:05.850506351 +0200
|
|
+++ src/components/speech/BUILD.gn 2023-05-14 14:39:12.182694489 +0200
|
|
@@ -4,12 +4,6 @@
|
|
|
|
source_set("speech") {
|
|
sources = [
|
|
- "audio_buffer.cc",
|
|
- "audio_buffer.h",
|
|
- "audio_encoder.cc",
|
|
- "audio_encoder.h",
|
|
- "chunked_byte_buffer.cc",
|
|
- "chunked_byte_buffer.h",
|
|
"downstream_loader.cc",
|
|
"downstream_loader.h",
|
|
"downstream_loader_client.h",
|
|
@@ -24,7 +18,6 @@
|
|
"//mojo/public/cpp/system",
|
|
"//services/network/public/cpp",
|
|
"//services/network/public/mojom",
|
|
- "//third_party/flac",
|
|
]
|
|
}
|
|
|