Update ui::UserActivityDetector to match mus UserActivityMonitor |
|||||||||||
Issue descriptionIn current chrome, ui::UserActivityDetector (https://cs.chromium.org/chromium/src/ui/base/user_activity/user_activity_detector.h?sq=package:chromium&dr=CSs&rcl=1468048567&l=21) is used to detect when a user becomes idle/active. In mus, this is done by UserActivityMonitor (https://cs.chromium.org/chromium/src/services/ui/public/interfaces/user_activity_monitor.mojom?sq=package:chromium&dr=CSs&rcl=1468048567&l=19 see issue 623296 for more details). To transition from the UserActivityDetector to UserActivityMonitor, we need to first convert the current ui::UserActivityObserver users to use the new mojom observer interfaces of UserActivityObserver and UserIdlenessObserver. See https://docs.google.com/document/d/1RNzW4vbFjTQA44ILT_jqEf9MCJvxTPbrcmrcW9vYHng/edit# for more details about the current UserActivityObserver usage.
,
Jul 10 2016
,
Jul 11 2016
,
Oct 4 2016
,
Jan 17 2017
I'm investigating short-term approaches for forwarding user activity from UserActivityMonitor to ui::UserActivityDetector without needing to update all of the existing code that uses ui::UserActivityObserver.
,
Jan 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/94887a2c9af708195be7560415090dd70eabd049 commit 94887a2c9af708195be7560415090dd70eabd049 Author: derat <derat@chromium.org> Date: Fri Jan 20 18:17:25 2017 mus: Forward user activity from window server to detector. Introduce an aura::UserActivityForwarder class that receives reports of user activity from the window server via mojo and forwards them to ui::UserActivityDetector so that existing classes implementing ui::UserActivityObserver will be notified. This results in user activity being reported to the Chrome OS power manager to prevent the display from being dimmed and turned off. BUG=626899 Review-Url: https://codereview.chromium.org/2639703004 Cr-Commit-Position: refs/heads/master@{#445095} [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ash/shell.cc [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ash/shell.h [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/services/ui/manifest.json [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/BUILD.gn [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/mus/DEPS [add] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/mus/user_activity_forwarder.cc [add] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/mus/user_activity_forwarder.h [add] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/mus/user_activity_forwarder_unittest.cc [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/test/DEPS [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/aura/test/run_all_unittests.cc [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/base/user_activity/user_activity_detector.cc [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/base/user_activity/user_activity_detector.h [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/base/user_activity/user_activity_detector_unittest.cc [modify] https://crrev.com/94887a2c9af708195be7560415090dd70eabd049/ui/chromeos/user_activity_power_manager_notifier.h
,
Jan 20 2017
We'll also need to instantiate ui::UserActivityDetector, ui::UserActivityPowerManagerNotifier, and ui::UserActivityForwarder in Chrome-on-mus. Right now, all three are instantiated by ash::Shell (the latter only for mash). Much longer term, when mus is always available, classes that care about user activity/idleness should register themselves as observers of the UserActivityMonitor ws interface and receive notifications directly. Then UserActivityDetector and UserActivityForwarder can be removed.
,
Mar 7 2017
,
Apr 27 2017
,
Feb 26 2018
,
Feb 26 2018
,
Aug 14
This is still relevant, but only for multi-process mash.
,
Aug 21
Dan, re: comment 7, "mus" is now always available. (Code in //ash always provides the window service mojo APIs via //services/ui/ws2.) The "window service process" and "ash process" are now the same process. Could that simplify things? (This came up while looking at ChromeBrowserMainExtraPartsAsh::PreProfileInit() today.)
,
Nov 24
I'm unlikely to get to this in the near future, so marking it as up for grabs. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by sadrul@chromium.org
, Jul 9 2016