#include "services/device/wake_lock/wake_lock_provider.h"
#include <memory>
#include <string>
#include <utility>
#include "base/not_fatal_until.h"
#include "base/task/single_thread_task_runner.h"
#include "mojo/public/cpp/bindings/remote_set.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/device/wake_lock/wake_lock.h"
#include "services/device/wake_lock/wake_lock_context.h"
#include "services/device/wake_lock/wake_lock_features.h"
namespace device {
struct WakeLockProvider::WakeLockDataPerType { … };
WakeLockProvider::WakeLockProvider(
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
const WakeLockContextCallback& native_view_getter)
: … { … }
WakeLockProvider::~WakeLockProvider() { … }
void WakeLockProvider::AddBinding(
mojo::PendingReceiver<mojom::WakeLockProvider> receiver) { … }
void WakeLockProvider::GetWakeLockContextForID(
int context_id,
mojo::PendingReceiver<mojom::WakeLockContext> receiver) { … }
void WakeLockProvider::GetWakeLockWithoutContext(
mojom::WakeLockType type,
mojom::WakeLockReason reason,
const std::string& description,
mojo::PendingReceiver<mojom::WakeLock> receiver) { … }
void WakeLockProvider::NotifyOnWakeLockDeactivation(
mojom::WakeLockType type,
mojo::PendingRemote<mojom::WakeLockObserver> pending_observer) { … }
void WakeLockProvider::GetActiveWakeLocksForTests(
mojom::WakeLockType type,
GetActiveWakeLocksForTestsCallback callback) { … }
void WakeLockProvider::OnWakeLockActivated(mojom::WakeLockType type) { … }
void WakeLockProvider::OnWakeLockDeactivated(mojom::WakeLockType type) { … }
void WakeLockProvider::OnWakeLockChanged(mojom::WakeLockType old_type,
mojom::WakeLockType new_type) { … }
void WakeLockProvider::OnConnectionError(mojom::WakeLockType type,
WakeLock* wake_lock) { … }
WakeLockProvider::WakeLockDataPerType& WakeLockProvider::GetWakeLockDataPerType(
mojom::WakeLockType type) { … }
}