• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..12-Nov-2020-

BUILD.gnH A D07-Nov-20205.4 KiB187162

OWNERSH A D07-Nov-2020168 54

README(WakeLock).mdH A D07-Nov-20201.2 KiB2520

battery_monitor.mojomH A D07-Nov-2020617 1612

battery_status.mojomH A D07-Nov-2020335 1310

bluetooth_system.mojomH A D07-Nov-20207.3 KiB202176

device_service.mojomH A D07-Nov-20204.1 KiB10679

fingerprint.mojomH A D07-Nov-20203.2 KiB9373

geolocation.mojomH A D07-Nov-20201.2 KiB3126

geolocation_config.mojomH A D07-Nov-2020499 1411

geolocation_context.mojomH A D07-Nov-2020918 2519

geolocation_control.mojomH A D07-Nov-20201.3 KiB2522

geoposition.mojomH A D07-Nov-20202.3 KiB6153

hid.mojomH A D07-Nov-202018 KiB418365

input_service.mojomH A D07-Nov-20201.6 KiB6049

mtp_file_entry.mojomH A D07-Nov-2020949 3430

mtp_manager.mojomH A D07-Nov-20202.7 KiB7760

mtp_storage_info.mojomH A D07-Nov-2020779 2623

nfc.mojomH A D07-Nov-20205.4 KiB161131

nfc_provider.mojomH A D07-Nov-2020670 2216

power_monitor.mojomH A D07-Nov-2020676 2317

public_ip_address_geolocation_provider.mojomH A D07-Nov-2020742 1915

screen_orientation.mojomH A D07-Nov-2020923 2419

screen_orientation_lock_types.mojomH A D07-Nov-2020867 3225

sensor.mojomH A D07-Nov-20203.7 KiB9783

sensor_provider.mojomH A D07-Nov-20201.9 KiB6046

serial.mojomH A D07-Nov-20204.3 KiB164135

time_zone_monitor.mojomH A D07-Nov-2020610 1814

usb_device.mojomH A D07-Nov-202010.5 KiB324279

usb_enumeration_options.mojomH A D07-Nov-2020608 3021

usb_manager.mojomH A D07-Nov-20202 KiB4838

usb_manager_client.mojomH A D07-Nov-2020483 1611

usb_manager_test.mojomH A D07-Nov-2020834 2821

vibration_manager.mojomH A D07-Nov-2020356 129

wake_lock.mojomH A D07-Nov-20202.9 KiB6857

wake_lock_context.mojomH A D07-Nov-2020522 1713

wake_lock_provider.mojomH A D07-Nov-20201.8 KiB4334

README(WakeLock).md

1WakeLock provides the ability to block the device / display from sleeping.
2
3On Android, the implementation is inherently coupled to the NativeView
4associated with the context of the requestor due to system APIs. To handle
5this coupling, the Wake Lock usage model on Android is as follows:
6
7(1) The embedder passes in a callback at Device Service construction that
8enables the Wake Lock implementation to map (embedder-specific) context IDs to
9NativeViews.
10(2) For a given embedder-specific context, a trusted client
11connects to the WakeLockProvider interface and gets a
12WakeLockContext instance that is associated with that context.
13(3) That trusted client then forwards requests to bind wake locks from
14untrusted clients that are made within that context, with the Wake Lock
15implementation using the callback from (1) as necessary to obtain the
16NativeView associated with that context.
17
18On other platforms, the usage model is similar but the callback is not
19necessary/employed.
20
21If the client does not have any context available (e.g., is not within the
22context of a WebContents), it can get a WakeLock that doesn't associate to any
23context (by GetWakeLockWithoutContext() in WakeLockProvider). However, note that
24the resulting Wake Lock will not have any effect on Android.
25