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