Commit 036f91b9 authored by derat's avatar derat Committed by Commit bot

ash: Instantiate UserActivityForwarder for --mus.

This class forwards user activity from ws to the
pre-servicification activity-handling mechanism, so it needs
to be used for --mus in addition to --mash. Check for
aura::Env::Mode::MUS to handle both modes.

BUG=717681
TEST=put --mus, --mash, and neither in /etc/chrome_dev.conf
     and check that user activity is reported in
     /var/log/power_manager/powerd.LATEST after hitting a
     key

Review-Url: https://codereview.chromium.org/2863623005
Cr-Commit-Position: refs/heads/master@{#469546}
parent e8422c6b
...@@ -982,8 +982,10 @@ void Shell::Init(const ShellInitParams& init_params) { ...@@ -982,8 +982,10 @@ void Shell::Init(const ShellInitParams& init_params) {
power_button_controller_->OnDisplayModeChanged( power_button_controller_->OnDisplayModeChanged(
display_configurator_->cached_displays()); display_configurator_->cached_displays());
// Forward user activity from the window server to |user_activity_detector_|.
// The connector is unavailable in some tests. // The connector is unavailable in some tests.
if (config == Config::MASH && shell_delegate_->GetShellConnector()) { if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS &&
shell_delegate_->GetShellConnector()) {
ui::mojom::UserActivityMonitorPtr user_activity_monitor; ui::mojom::UserActivityMonitorPtr user_activity_monitor;
shell_delegate_->GetShellConnector()->BindInterface(ui::mojom::kServiceName, shell_delegate_->GetShellConnector()->BindInterface(ui::mojom::kServiceName,
&user_activity_monitor); &user_activity_monitor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment