WakeLock: Add mojo observer API for wake locks

Desktop / Chromium - Abhishek Bhardwaj [chromium.org] - 23 February 2019 03:07 EST

This change tracks system wide wake locks per type and adds a mojo API to notify clients of wake lock activation and deactivation per type.

BUG=chromium:913353 TEST=WakeLockTest unit tests.

Change-Id: I5a31e5541fce0b88479ffd55362bd8420631c5a1 Reviewed-on: https://chromium-review.googlesource.com/c/1372220 Commit-Queue: Abhishek Bhardwaj

60000a1acaf2 WakeLock: Add mojo observer API for wake locks
components/arc/power/arc_power_bridge_unittest.cc | 71 +++---
.../arc/wake_lock/arc_wake_lock_bridge_unittest.cc | 44 ++--
services/device/device_service.cc | 7 +-
services/device/device_service.h | 2 +
.../public/cpp/test/test_wake_lock_provider.cc | 200 ++++++++++++---
.../public/cpp/test/test_wake_lock_provider.h | 46 ++--
.../device/public/mojom/wake_lock_provider.mojom | 15 ++
services/device/wake_lock/wake_lock.cc | 15 +-
services/device/wake_lock/wake_lock.h | 5 +
services/device/wake_lock/wake_lock_provider.cc | 121 +++++++--
services/device/wake_lock/wake_lock_provider.h | 45 +++-
services/device/wake_lock/wake_lock_unittest.cc | 281 ++++++++++++++++++++-
12 files changed, 702 insertions(+), 150 deletions(-)

Upstream: git.chromium.org


  • Share