mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-23 14:26:18 +00:00
186 lines
8.1 KiB
Diff
186 lines
8.1 KiB
Diff
--- 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" ]
|