mirror of
https://codeberg.org/kiss-community/repo
synced 2025-01-12 05:40:23 -07:00
chromium: Added patches to remove dbus/atk
This commit is contained in:
parent
795c6fb4e1
commit
11cc862797
testing/chromium
63
testing/chromium/patches/chromium-optional-atk-r1.patch
Normal file
63
testing/chromium/patches/chromium-optional-atk-r1.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff --git chromium-73.0.3683.103/build/config/ui.gni chromium-73.0.3683.103/build/config/ui.gni
|
||||
index 547b42fb5..966b00c2a 100644
|
||||
--- chromium-73.0.3683.103/build/config/ui.gni
|
||||
+++ chromium-73.0.3683.103/build/config/ui.gni
|
||||
@@ -51,8 +51,10 @@ if (use_ozone) {
|
||||
use_glib = false
|
||||
}
|
||||
|
||||
-# Whether to use atk, the Accessibility ToolKit library
|
||||
-use_atk = is_desktop_linux && use_x11
|
||||
+declare_args() {
|
||||
+ # Whether to use atk, the Accessibility ToolKit library
|
||||
+ use_atk = is_desktop_linux && use_x11
|
||||
+}
|
||||
# =============================================
|
||||
# PLEASE DO NOT ADD MORE FLAGS TO THIS FILE
|
||||
# =============================================
|
||||
diff --git chromium-73.0.3683.103/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc chromium-73.0.3683.103/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
index bd2f435da..5c2ec8b90 100644
|
||||
--- chromium-73.0.3683.103/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ chromium-73.0.3683.103/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -17,7 +17,9 @@
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
+#if defined(USE_ATK)
|
||||
#include "ui/accessibility/platform/atk_util_auralinux.h"
|
||||
+#endif
|
||||
#include "ui/aura/client/aura_constants.h"
|
||||
#include "ui/aura/client/cursor_client.h"
|
||||
#include "ui/aura/client/focus_client.h"
|
||||
@@ -2049,11 +2051,15 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
break;
|
||||
}
|
||||
case KeyPress: {
|
||||
+#if defined(USE_ATK)
|
||||
if (ui::AtkUtilAuraLinux::HandleKeyEvent(xev) !=
|
||||
ui::DiscardAtkKeyEvent::Discard) {
|
||||
+#endif
|
||||
ui::KeyEvent keydown_event(xev);
|
||||
DispatchKeyEvent(&keydown_event);
|
||||
+#if defined(USE_ATK)
|
||||
}
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
case KeyRelease: {
|
||||
@@ -2062,11 +2068,15 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
if (!IsActive() && !HasCapture())
|
||||
break;
|
||||
|
||||
+#if defined(USE_ATK)
|
||||
if (ui::AtkUtilAuraLinux::HandleKeyEvent(xev) !=
|
||||
ui::DiscardAtkKeyEvent::Discard) {
|
||||
+#endif
|
||||
ui::KeyEvent key_event(xev);
|
||||
DispatchKeyEvent(&key_event);
|
||||
+#if defined(USE_ATK)
|
||||
}
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
case ButtonPress:
|
185
testing/chromium/patches/chromium-optional-dbus-r5.patch
Normal file
185
testing/chromium/patches/chromium-optional-dbus-r5.patch
Normal file
@ -0,0 +1,185 @@
|
||||
--- chromium-75.0.3770.100/chrome/browser/BUILD.gn
|
||||
+++ chromium-75.0.3770.100/chrome/browser/BUILD.gn
|
||||
@@ -3681,14 +3681,16 @@ jumbo_split_static_library("browser") {
|
||||
"first_run/upgrade_util_linux.cc",
|
||||
"first_run/upgrade_util_linux.h",
|
||||
"icon_loader_auralinux.cc",
|
||||
- "password_manager/native_backend_kwallet_x.cc",
|
||||
- "password_manager/native_backend_kwallet_x.h",
|
||||
"platform_util_linux.cc",
|
||||
"shell_integration_linux.cc",
|
||||
"shell_integration_linux.h",
|
||||
]
|
||||
|
||||
if (use_dbus) {
|
||||
+ sources += [
|
||||
+ "password_manager/native_backend_kwallet_x.cc",
|
||||
+ "password_manager/native_backend_kwallet_x.h",
|
||||
+ ]
|
||||
deps += [ "//components/dbus:dbus_thread_linux" ]
|
||||
}
|
||||
|
||||
--- chromium-75.0.3770.100/chrome/browser/chrome_browser_main_linux.cc
|
||||
+++ chromium-75.0.3770.100/chrome/browser/chrome_browser_main_linux.cc
|
||||
@@ -95,7 +95,7 @@ void ChromeBrowserMainPartsLinux::PostProfileInit() {
|
||||
}
|
||||
|
||||
void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() {
|
||||
-#if !defined(OS_CHROMEOS)
|
||||
+#if !defined(OS_CHROMEOS) && defined(USE_DBUS)
|
||||
bluez::BluezDBusManager::Initialize(nullptr /* system_bus */);
|
||||
#endif
|
||||
|
||||
@@ -103,7 +103,7 @@ void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() {
|
||||
}
|
||||
|
||||
void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
|
||||
-#if !defined(OS_CHROMEOS)
|
||||
+#if !defined(OS_CHROMEOS) && defined(USE_DBUS)
|
||||
bluez::BluezDBusManager::Shutdown();
|
||||
bluez::BluezDBusThreadManager::Shutdown();
|
||||
#endif
|
||||
diff --git chromium-75.0.3770.100/chrome/browser/metrics/bluetooth_available_utility.cc chromium-75.0.3770.100/chrome/browser/metrics/bluetooth_available_utility.cc
|
||||
index 1f6c223..dcade65 100644
|
||||
--- chromium-75.0.3770.100/chrome/browser/metrics/bluetooth_available_utility.cc
|
||||
+++ chromium-75.0.3770.100/chrome/browser/metrics/bluetooth_available_utility.cc
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "device/bluetooth/bluetooth_adapter.h"
|
||||
#include "device/bluetooth/bluetooth_adapter_factory.h"
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) && defined(USE_DBUS)
|
||||
#include "device/bluetooth/dbus/bluez_dbus_manager.h"
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
@@ -62,7 +62,7 @@ void ReportBluetoothAvailability() {
|
||||
return;
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) && defined(USE_DBUS)
|
||||
// This is for tests that have not initialized bluez or dbus thread manager.
|
||||
// Outside of tests these are initialized earlier during browser startup.
|
||||
if (!bluez::BluezDBusManager::IsInitialized())
|
||||
diff --git chromium-75.0.3770.100/chrome/browser/password_manager/password_store_factory.cc chromium-75.0.3770.100/chrome/browser/password_manager/password_store_factory.cc
|
||||
index 03d205d0e..cb8e9e820 100644
|
||||
--- chromium-75.0.3770.100/chrome/browser/password_manager/password_store_factory.cc
|
||||
+++ chromium-75.0.3770.100/chrome/browser/password_manager/password_store_factory.cc
|
||||
@@ -211,6 +211,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(
|
||||
std::unique_ptr<PasswordStoreX::NativeBackend> backend;
|
||||
if (selected_backend == os_crypt::SelectedLinuxBackend::KWALLET ||
|
||||
selected_backend == os_crypt::SelectedLinuxBackend::KWALLET5) {
|
||||
+#if defined(USE_DBUS)
|
||||
VLOG(1) << "Trying KWallet for password storage.";
|
||||
base::nix::DesktopEnvironment used_desktop_env =
|
||||
selected_backend == os_crypt::SelectedLinuxBackend::KWALLET
|
||||
@@ -223,6 +224,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(
|
||||
} else {
|
||||
backend.reset();
|
||||
}
|
||||
+#endif // defined(USE_DBUS)
|
||||
} else if (selected_backend == os_crypt::SelectedLinuxBackend::GNOME_ANY ||
|
||||
selected_backend ==
|
||||
os_crypt::SelectedLinuxBackend::GNOME_KEYRING ||
|
||||
diff --git chromium-75.0.3770.100/device/bluetooth/bluetooth_adapter_factory.cc chromium-75.0.3770.100/device/bluetooth/bluetooth_adapter_factory.cc
|
||||
index 6413a162c..4a7fa801a 100644
|
||||
--- chromium-75.0.3770.100/device/bluetooth/bluetooth_adapter_factory.cc
|
||||
+++ chromium-75.0.3770.100/device/bluetooth/bluetooth_adapter_factory.cc
|
||||
@@ -96,7 +96,7 @@ bool BluetoothAdapterFactory::IsBluetoothSupported() {
|
||||
// instance even on platforms that would otherwise not support it.
|
||||
if (default_adapter.Get())
|
||||
return true;
|
||||
-#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_LINUX) || \
|
||||
+#if defined(OS_ANDROID) || defined(OS_WIN) || (defined(OS_LINUX) && defined(USE_DBUS)) || \
|
||||
defined(OS_MACOSX)
|
||||
return true;
|
||||
#else
|
||||
@@ -119,7 +119,7 @@ bool BluetoothAdapterFactory::IsLowEnergySupported() {
|
||||
return base::win::GetVersion() >= base::win::VERSION_WIN10;
|
||||
#elif defined(OS_MACOSX)
|
||||
return base::mac::IsAtLeastOS10_10();
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif (defined(OS_LINUX) && defined(USE_DBUS))
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
diff --git chromium-75.0.3770.100/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc chromium-75.0.3770.100/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
||||
index adbe0ca74..91781e839 100644
|
||||
--- chromium-75.0.3770.100/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
||||
+++ chromium-75.0.3770.100/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
||||
@@ -1328,7 +1328,7 @@ void BluetoothLowEnergyCreateServiceFunction::DoWork() {
|
||||
// TODO: Ideally this should be handled by our feature system, so that this
|
||||
// code doesn't even compile on OSes it isn't being used on, but currently this
|
||||
// is not possible.
|
||||
-#if !defined(OS_WIN)
|
||||
+#if !defined(OS_WIN) && (!defined(OS_LINUX) || defined(USE_DBUS))
|
||||
base::WeakPtr<device::BluetoothLocalGattService> service =
|
||||
device::BluetoothLocalGattService::Create(
|
||||
event_router_->adapter(),
|
||||
@@ -1357,6 +1357,7 @@ bool BluetoothLowEnergyCreateCharacteristicFunction::ParseParams() {
|
||||
}
|
||||
|
||||
void BluetoothLowEnergyCreateCharacteristicFunction::DoWork() {
|
||||
+#if !defined(OS_LINUX) || defined(USE_DBUS)
|
||||
device::BluetoothLocalGattService* service =
|
||||
event_router_->adapter()->GetGattService(params_->service_id);
|
||||
if (!service) {
|
||||
@@ -1377,6 +1378,9 @@ void BluetoothLowEnergyCreateCharacteristicFunction::DoWork() {
|
||||
|
||||
Respond(ArgumentList(apibtle::CreateCharacteristic::Results::Create(
|
||||
characteristic->GetIdentifier())));
|
||||
+#else
|
||||
+ Respond(Error(kErrorPlatformNotSupported));
|
||||
+#endif
|
||||
}
|
||||
|
||||
// createDescriptor:
|
||||
@@ -1393,6 +1397,7 @@ bool BluetoothLowEnergyCreateDescriptorFunction::ParseParams() {
|
||||
}
|
||||
|
||||
void BluetoothLowEnergyCreateDescriptorFunction::DoWork() {
|
||||
+#if !defined(OS_LINUX) || defined(USE_DBUS)
|
||||
device::BluetoothLocalGattCharacteristic* characteristic =
|
||||
event_router_->GetLocalCharacteristic(params_->characteristic_id);
|
||||
if (!characteristic) {
|
||||
@@ -1408,6 +1413,9 @@ void BluetoothLowEnergyCreateDescriptorFunction::DoWork() {
|
||||
|
||||
Respond(ArgumentList(
|
||||
apibtle::CreateDescriptor::Results::Create(descriptor->GetIdentifier())));
|
||||
+#else
|
||||
+ Respond(Error(kErrorPlatformNotSupported));
|
||||
+#endif
|
||||
}
|
||||
|
||||
// registerService:
|
||||
diff --git chromium-75.0.3770.100/services/device/battery/battery_status_manager_default.cc chromium-75.0.3770.100/services/device/battery/battery_status_manager_default.cc
|
||||
index 0249c6faa..ab2ff4e17 100644
|
||||
--- chromium-75.0.3770.100/services/device/battery/battery_status_manager_default.cc
|
||||
+++ chromium-75.0.3770.100/services/device/battery/battery_status_manager_default.cc
|
||||
@@ -22,11 +22,10 @@ class BatteryStatusManagerDefault : public BatteryStatusManager {
|
||||
private:
|
||||
// BatteryStatusManager:
|
||||
bool StartListeningBatteryChange() override {
|
||||
- NOTIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
|
||||
- void StopListeningBatteryChange() override { NOTIMPLEMENTED(); }
|
||||
+ void StopListeningBatteryChange() override { }
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerDefault);
|
||||
};
|
||||
diff --git chromium-75.0.3770.100/services/device/wake_lock/power_save_blocker/BUILD.gn chromium-75.0.3770.100/services/device/wake_lock/power_save_blocker/BUILD.gn
|
||||
index 788bb497b..b40c0394f 100644
|
||||
--- chromium-75.0.3770.100/services/device/wake_lock/power_save_blocker/BUILD.gn
|
||||
+++ chromium-75.0.3770.100/services/device/wake_lock/power_save_blocker/BUILD.gn
|
||||
@@ -62,6 +62,9 @@ source_set("power_save_blocker") {
|
||||
if (is_chromeos || !use_x11 || !use_dbus) {
|
||||
sources -= [ "power_save_blocker_x11.cc" ]
|
||||
}
|
||||
+ if (!is_chromeos && use_x11 && !use_dbus) {
|
||||
+ sources += [ "power_save_blocker_ozone.cc" ]
|
||||
+ }
|
||||
|
||||
if (is_android) {
|
||||
deps += [ ":jni_headers" ]
|
@ -1 +1,3 @@
|
||||
https://commondatastorage.googleapis.com/chromium-browser-official/chromium-75.0.3770.142.tar.xz
|
||||
patches/chromium-optional-atk-r1.patch
|
||||
patches/chromium-optional-dbus-r5.patch
|
||||
|
Loading…
Reference in New Issue
Block a user