hal/HalWakeLock.h
author Emma Malysz <emalysz@mozilla.com>
Fri, 27 Mar 2020 15:28:11 +0000
changeset 584248 ea8c56f0814df739bfa1939e55d53ddab7e40e4c
parent 508163 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1624511, ensure that tab crashes within the same content process can be restored. r=Gijs, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D68318

/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef __HAL_WAKELOCK_H_
#define __HAL_WAKELOCK_H_

namespace mozilla {
namespace hal {

enum WakeLockState {
  WAKE_LOCK_STATE_UNLOCKED,
  WAKE_LOCK_STATE_HIDDEN,
  WAKE_LOCK_STATE_VISIBLE
};

/**
 * Return the wake lock state according to the numbers.
 */
WakeLockState ComputeWakeLockState(int aNumLocks, int aNumHidden);

}  // namespace hal
}  // namespace mozilla

#endif /* __HAL_WAKELOCK_H_ */