#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "ui/base/idle/idle.h"
#include "ui/base/idle/idle_internal.h"
#include "ui/display/screen.h"
#if defined(USE_DBUS)
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/no_destructor.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"
#endif
namespace ui {
#if defined(USE_DBUS)
namespace {
const char kMethodName[] = …;
const char kSignalName[] = …;
struct { … } constexpr kServices[] = …;
constexpr size_t kServiceCount = …;
class DBusScreenSaverWatcher { … };
DBusScreenSaverWatcher* GetDBusScreenSaverWatcher() { … }
}
#endif
int CalculateIdleTime() { … }
bool CheckIdleStateIsLocked() { … }
}