New issue
Advanced search Search tips
Starred by 13 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature


Sign in to add a comment
link

Issue 878979: User Idle Detection API

Reported by jsb...@chromium.org, Aug 29 Project Member

Issue description

There's a chrome.idle.* API that allows chrome apps to detect when the user is active or idle, and when the screen is locked. 

We should expose something similar to the web for use by chat apps, etc.

Rough sketch at: https://github.com/inexorabletash/idle-detection
 

Comment 1 by dtapu...@chromium.org, Sep 5

Components: -Blink Blink>Scheduling

Comment 2 by jsb...@chromium.org, Sep 5

Components: -Blink>Scheduling Blink>Input
This is not idle as in CPU activity but idle as in "is the user generating input activity".

So closer to input than scheduling.

Comment 3 by dxie@google.com, Oct 12

Labels: -Pri-3 Proj-Fugu Pri-1

Comment 4 by dxie@google.com, Oct 19

Labels: Target-72 M-75

Comment 5 by jsb...@chromium.org, Oct 26

Summary: User Idle Detection API (was: Add Idle Detection API )

Comment 6 by jsb...@chromium.org, Nov 8

Labels: -Target-72 -M-75 M-76 Target-73
Slipping by at least a milestone; will likely hand off to new owner.

Comment 7 by jsb...@chromium.org, Nov 15

Cc: jsb...@chromium.org
Owner: goto@chromium.org
Status: Started (was: Assigned)

Comment 8 by goto@google.com, Nov 16

Created a chromestatus feature. LMK If I got some of the fields wrong here (e.g. is category > user input the best one?).

Made @jsbell an owner, so feel free to change as appropriate.

https://www.chromestatus.com/feature/4590256452009984

Comment 9 by goto@chromium.org, Dec 11

Blockedon: 913988

Comment 10 by goto@chromium.org, Dec 14

Blockedon: 915290

Comment 11 by bugdroid1@chromium.org, Jan 18

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c

commit 366a1d932aa48b7d42f6d6f900bfca4a0738fa1c
Author: Sam Goto <goto@chromium.org>
Date: Fri Jan 18 21:47:35 2019

Idle Detection API: Prototype

https://github.com/inexorabletash/idle-detection

Just a webification of the chrome.idle.* APIs.

Does not yet include:

- permission checks
- android integration
- final API

Intent to implement:

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/OuwzBmH02M4

Design doc:

https://docs.google.com/document/d/1_XlwY3NuG2HwWEYVrR-MNvw_i4hj5ZNj3gKvxWqO0FU/edit

Bug: 878979
Change-Id: Ie45b34d5c29e04dfe65f8ff5127c6be34850d68f
Reviewed-on: https://chromium-review.googlesource.com/c/1351490
Commit-Queue: Sam Goto <goto@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Auto-Submit: Sam Goto <goto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624304}
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/android_webview/browser/aw_permission_manager.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/BUILD.gn
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/idle/OWNERS
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/idle/idle_detection_permission_context.cc
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/idle/idle_detection_permission_context.h
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/permissions/permission_manager.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/permissions/permission_util.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/components/content_settings/core/common/content_settings.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/components/content_settings/core/common/content_settings_types.h
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/BUILD.gn
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/DEPS
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/devtools/protocol/browser_handler.cc
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/idle/OWNERS
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/idle/idle_manager.cc
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/idle/idle_manager.h
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/idle/idle_manager_unittest.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/renderer_interface_binders.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/browser/storage_partition_impl.h
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/public/browser/permission_type.h
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/shell/browser/shell_permission_manager.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/content/test/BUILD.gn
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/public/BUILD.gn
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/public/platform/modules/idle/OWNERS
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/public/platform/modules/idle/idle_manager.mojom
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/public/platform/modules/permissions/permission.mojom
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/BUILD.gn
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/event_target_modules_names.json5
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/BUILD.gn
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/DEPS
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/OWNERS
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_manager.cc
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_manager.h
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_manager.idl
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_options.idl
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_status.cc
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_status.h
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/idle_status.idl
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/navigator_idle.cc
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/navigator_idle.h
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/navigator_idle.idl
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/idle/worker_navigator_idle.idl
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/permissions/permission_descriptor.idl
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/modules/permissions/permissions.cc
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/renderer/platform/runtime_enabled_features.json5
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/external/wpt/idle-detection/META.yml
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/external/wpt/idle-detection/basics.tentative.https.any.js
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/external/wpt/idle-detection/idle-detection.idl
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/external/wpt/idle-detection/idlharness.https.any.js
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/ui/base/BUILD.gn
[add] https://crrev.com/366a1d932aa48b7d42f6d6f900bfca4a0738fa1c/ui/base/idle/idle_android.cc

Comment 12 by goto@chromium.org, Jan 22

Blockedon: 924208
Kicked off a launch review. Marking this bug blocked on that to make sure it doesn't fall through the cracks.

https://bugs.chromium.org/p/chromium/issues/approval?id=924208

Comment 13 by goto@chromium.org, Jan 22

Per process, also kicked off a TAG review:

https://github.com/w3ctag/design-reviews/issues/336

Comment 14 by bugdroid, Jan 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/241ac98bfc66b6412effa8fc3606e19b51374115

commit 241ac98bfc66b6412effa8fc3606e19b51374115
Author: Sam Goto <goto@chromium.org>
Date: Tue Jan 29 19:00:31 2019

[idle] Add a test to assert we stop polling when the renderer disconnects.

Polling for the idle status is resource intensive so we want to make sure
it stops when script isn't listening to idle events, which happens
whenever the monitor pipe disconnects (e.g. when the JS binding goes
out of scope).

Bug: 878979
Change-Id: I50f5f398b671dc68a6a400cb46025343afd39231
Reviewed-on: https://chromium-review.googlesource.com/c/1441313
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Sam Goto <goto@chromium.org>
Auto-Submit: Sam Goto <goto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627089}
[modify] https://crrev.com/241ac98bfc66b6412effa8fc3606e19b51374115/content/browser/idle/idle_manager_unittest.cc

Comment 15 by dxie@chromium.org, Jan 31

Labels: -Target-73 -M-76 M-77 Target-74

Comment 16 by goto@google.com, Feb 12 (4 days ago)

Blockedon: 931423

Comment 17 by goto@google.com, Feb 13 (3 days ago)

Blockedon: 931783

Comment 18 by goto@chromium.org, Feb 14 (2 days ago)

Blockedon: 932206

Comment 19 by bugdroid, Feb 14 (2 days ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c580800aef69203cb5795c027ba6f79bac8ee0d

commit 9c580800aef69203cb5795c027ba6f79bac8ee0d
Author: Sam Goto <goto@chromium.org>
Date: Thu Feb 14 20:51:58 2019

[idle] Support Idle detection on Android.

We mocked out the android implementation in our early implementation, which
we address here. The AndroidIdleDetector makes bridge between the C++ idle
detection system and Android's Java Broadcast receivers.

Intent to implement:

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/OuwzBmH02M4

Design doc:

https://docs.google.com/document/d/1_XlwY3NuG2HwWEYVrR-MNvw_i4hj5ZNj3gKvxWqO0FU/edit

Bug: 878979
Change-Id: I2a6c288c750574f1d777115d9e574c66a3dcbbdb
Reviewed-on: https://chromium-review.googlesource.com/c/1415296
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Sam Goto <goto@chromium.org>
Auto-Submit: Sam Goto <goto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632355}
[modify] https://crrev.com/9c580800aef69203cb5795c027ba6f79bac8ee0d/ui/android/BUILD.gn
[add] https://crrev.com/9c580800aef69203cb5795c027ba6f79bac8ee0d/ui/android/java/src/org/chromium/ui/base/IdleDetector.java
[modify] https://crrev.com/9c580800aef69203cb5795c027ba6f79bac8ee0d/ui/base/BUILD.gn
[modify] https://crrev.com/9c580800aef69203cb5795c027ba6f79bac8ee0d/ui/base/idle/BUILD.gn
[modify] https://crrev.com/9c580800aef69203cb5795c027ba6f79bac8ee0d/ui/base/idle/DEPS
[modify] https://crrev.com/9c580800aef69203cb5795c027ba6f79bac8ee0d/ui/base/idle/idle_android.cc

Sign in to add a comment