summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-08 18:09:13 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-08 18:09:13 +0000
commit1cacbc67f75b3eb4a1d5720f509083be5571c323 (patch)
tree8be418038e7145263542094da1adf803bc2d329c /ash/shell.cc
parent2c05d9130a944565f6cd34f9e2c2aca0312e9c13 (diff)
downloadchromium_src-1cacbc67f75b3eb4a1d5720f509083be5571c323.zip
chromium_src-1cacbc67f75b3eb4a1d5720f509083be5571c323.tar.gz
chromium_src-1cacbc67f75b3eb4a1d5720f509083be5571c323.tar.bz2
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
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc13
1 files changed, 11 insertions, 2 deletions
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<views::corewm::NativeCursorManager>(
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<ash::BrightnessControlDelegate>(
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