#include "components/power_monitor/power_monitor_device_source_linux.h"
#include <utility>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "components/dbus/thread_linux/dbus_thread_linux.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
namespace {
scoped_refptr<dbus::Bus> CreateBus() { … }
}
PowerMonitorDeviceSourceLinux::PowerMonitorDeviceSourceLinux()
: … { … }
PowerMonitorDeviceSourceLinux::~PowerMonitorDeviceSourceLinux() { … }
bool PowerMonitorDeviceSourceLinux::IsOnBatteryPower() { … }
void PowerMonitorDeviceSourceLinux::ShutdownBus() { … }
void PowerMonitorDeviceSourceLinux::OnSignalConnected(
const std::string& interface_name,
const std::string& signal_name,
bool connected) { … }
void PowerMonitorDeviceSourceLinux::OnPrepareForSleep(dbus::Signal* signal) { … }