#include "services/device/wake_lock/wake_lock.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "services/device/wake_lock/wake_lock_features.h"
#if BUILDFLAG(IS_ANDROID)
#include "services/device/wake_lock/wake_lock_context.h"
#include "ui/gfx/native_widget_types.h"
#endif
namespace device {
WakeLock::WakeLock(mojo::PendingReceiver<mojom::WakeLock> receiver,
mojom::WakeLockType type,
mojom::WakeLockReason reason,
const std::string& description,
int context_id,
WakeLockContextCallback native_view_getter,
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
Observer* observer)
: … { … }
WakeLock::~WakeLock() { … }
void WakeLock::AddClient(mojo::PendingReceiver<mojom::WakeLock> receiver) { … }
void WakeLock::RequestWakeLock() { … }
void WakeLock::CancelWakeLock() { … }
void WakeLock::ChangeType(mojom::WakeLockType type,
ChangeTypeCallback callback) { … }
void WakeLock::HasWakeLockForTests(HasWakeLockForTestsCallback callback) { … }
void WakeLock::UpdateWakeLock() { … }
void WakeLock::CreateWakeLock() { … }
void WakeLock::RemoveWakeLock() { … }
void WakeLock::SwapWakeLock() { … }
void WakeLock::OnConnectionError() { … }
}