From 1cacbc67f75b3eb4a1d5720f509083be5571c323 Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Tue, 8 Oct 2013 18:09:13 +0000 Subject: chromeos: Move several power-related classes to Ash. Move SuspendObserver, UserActivityNotifier, and VideoActivityNotifier from chrome/browser/chromeos/power to ash/system/chromeos/power. BUG=none Review URL: https://codereview.chromium.org/25996007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227544 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ash/shell.cc') diff --git a/ash/shell.cc b/ash/shell.cc index ff2e643..94c0d4a 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -122,6 +122,9 @@ #endif // defined(USE_X11) #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" #include "ash/system/chromeos/power/power_status.h" +#include "ash/system/chromeos/power/suspend_observer.h" +#include "ash/system/chromeos/power/user_activity_notifier.h" +#include "ash/system/chromeos/power/video_activity_notifier.h" #endif // defined(OS_CHROMEOS) namespace ash { @@ -539,7 +542,7 @@ Shell::Shell(ShellDelegate* delegate) activation_client_(NULL), #if defined(OS_CHROMEOS) && defined(USE_X11) output_configurator_(new chromeos::OutputConfigurator()), -#endif // defined(OS_CHROMEOS) +#endif // defined(OS_CHROMEOS) && defined(USE_X11) native_cursor_manager_(new AshNativeCursorManager), cursor_manager_(scoped_ptr( native_cursor_manager_)), @@ -869,11 +872,17 @@ void Shell::Init() { env_filter_->set_cursor_hidden_by_filter(true); } - // Set accelerator controller delegates. #if defined(OS_CHROMEOS) + // Set accelerator controller delegates. accelerator_controller_->SetBrightnessControlDelegate( scoped_ptr( new ash::system::BrightnessControllerChromeos).Pass()); + + suspend_observer_.reset(new internal::SuspendObserver()); + user_activity_notifier_.reset( + new internal::UserActivityNotifier(user_activity_detector_.get())); + video_activity_notifier_.reset( + new internal::VideoActivityNotifier(video_detector_.get())); #endif // The compositor thread and main message loop have to be running in -- cgit v1.1