#include "ui/ozone/platform/wayland/host/org_gnome_mutter_idle_monitor.h"
#include "base/logging.h"
#include "base/task/task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
namespace ui {
namespace {
constexpr uint64_t kIdleThresholdMs = …;
constexpr char kInterface[] = …;
constexpr char kObjectPath[] = …;
constexpr char kMethodAddIdleWatch[] = …;
constexpr char kMethodAddUserActiveWatch[] = …;
constexpr char kMethodGetIdletime[] = …;
constexpr char kSignalWatchFired[] = …;
}
OrgGnomeMutterIdleMonitor::OrgGnomeMutterIdleMonitor()
: … { … }
OrgGnomeMutterIdleMonitor::~OrgGnomeMutterIdleMonitor() = default;
std::optional<base::TimeDelta> OrgGnomeMutterIdleMonitor::GetIdleTime() const { … }
void OrgGnomeMutterIdleMonitor::OnServiceHasOwner(dbus::Response* response) { … }
void OrgGnomeMutterIdleMonitor::OnWatchFiredSignalConnected(
const std::string& interface,
const std::string& signal,
bool succeeded) { … }
void OrgGnomeMutterIdleMonitor::OnAddIdleWatch(dbus::Response* response) { … }
void OrgGnomeMutterIdleMonitor::OnAddUserActiveWatch(dbus::Response* response) { … }
void OrgGnomeMutterIdleMonitor::OnGetIdletime(dbus::Response* response) { … }
void OrgGnomeMutterIdleMonitor::OnWatchFired(dbus::Signal* signal) { … }
bool OrgGnomeMutterIdleMonitor::UpdateIdleTime(dbus::Message* message) { … }
bool OrgGnomeMutterIdleMonitor::ReadWatchId(dbus::Message* message,
uint32_t* watch_id) { … }
void OrgGnomeMutterIdleMonitor::Shutdown() { … }
}