#include "chrome/browser/ui/views/dark_mode_manager_linux.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "chrome/browser/ui/ui_features.h"
#include "components/dbus/thread_linux/dbus_thread_linux.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_proxy.h"
#include "ui/linux/linux_ui.h"
#include "ui/linux/linux_ui_factory.h"
#include "ui/native_theme/native_theme.h"
namespace ui {
namespace {
scoped_refptr<dbus::Bus> CreateBus() { … }
}
DarkModeManagerLinux::DarkModeManagerLinux()
: … { … }
DarkModeManagerLinux::DarkModeManagerLinux(
scoped_refptr<dbus::Bus> bus,
LinuxUiTheme* default_linux_ui_theme,
const std::vector<raw_ptr<LinuxUiTheme, VectorExperimental>>*
linux_ui_themes,
std::vector<raw_ptr<NativeTheme, VectorExperimental>> native_themes)
: … { … }
DarkModeManagerLinux::~DarkModeManagerLinux() { … }
void DarkModeManagerLinux::OnNativeThemeUpdated(
ui::NativeTheme* observed_theme) { … }
void DarkModeManagerLinux::OnSignalConnected(const std::string& interface_name,
const std::string& signal_name,
bool connected) { … }
void DarkModeManagerLinux::OnPortalSettingChanged(dbus::Signal* signal) { … }
void DarkModeManagerLinux::OnReadColorSchemeResponse(dbus::Response* response) { … }
void DarkModeManagerLinux::OnReadAccentColorResponse(dbus::Response* response) { … }
void DarkModeManagerLinux::OnReadError(dbus::ErrorResponse* error) { … }
void DarkModeManagerLinux::SetColorScheme(bool prefer_dark_theme,
bool from_toolkit_theme) { … }
void DarkModeManagerLinux::SetAccentColor(dbus::MessageReader* reader) { … }
}