Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2702)

Unified Diff: ash/shell.cc

Issue 2524863003: Move DisplayChangeObserver + tests from ash to ui. (Closed)
Patch Set: Replace with static method. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 82b55ed9f744535c7ec53c12b62fbd53090c6229..bc399ed69abd3c994a4838b24f4c774564a90997 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -119,7 +119,6 @@
#include "ash/common/system/chromeos/bluetooth/bluetooth_notification_controller.h"
#include "ash/common/system/chromeos/power/power_status.h"
#include "ash/display/ash_display_string_provider.h"
-#include "ash/display/display_change_observer_chromeos.h"
#include "ash/display/display_color_manager_chromeos.h"
#include "ash/display/display_error_observer_chromeos.h"
#include "ash/display/projecting_observer_chromeos.h"
@@ -137,6 +136,7 @@
#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "ui/chromeos/user_activity_power_manager_notifier.h"
+#include "ui/display/chromeos/display_change_observer.h"
#include "ui/display/chromeos/display_configurator.h"
#if defined(USE_X11)
@@ -623,11 +623,13 @@ void Shell::Init(const ShellInitParams& init_params) {
wm_shell_->AddShellObserver(projecting_observer_.get());
if (!display_initialized && base::SysInfo::IsRunningOnChromeOS()) {
- display_change_observer_ = base::MakeUnique<DisplayChangeObserver>(
+ display_change_observer_ = base::MakeUnique<display::DisplayChangeObserver>(
base::MakeUnique<AshDisplayStringProvider>());
display_change_observer_->set_display_configurator(
display_configurator_.get());
display_change_observer_->set_display_manager(display_manager_.get());
+ display_change_observer_->set_display_changing_callback(
+ base::Bind(ui::UserActivityDetector::OnDisplayPowerChangingStatic));
shutdown_observer_ =
base::MakeUnique<ShutdownObserver>(display_configurator_.get());

Powered by Google App Engine
This is Rietveld 408576698