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

Unified Diff: ash/shell.cc

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Change DCO constructor slightly. Created 4 years 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
« no previous file with comments | « ash/shell.h ('k') | ash/system/chromeos/screen_layout_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index fff241c2e0f56bda0bc57d0031458593d642daa7..e386bdd0edfbad0fee92a6f25e21abc0136f98ed 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -124,6 +124,7 @@
#include "ash/display/projecting_observer_chromeos.h"
#include "ash/display/resolution_notification_controller.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
+#include "ash/display/shutdown_observer_chromeos.h"
#include "ash/sticky_keys/sticky_keys_controller.h"
#include "ash/system/chromeos/power/power_event_observer.h"
#include "ash/system/chromeos/power/video_activity_notifier.h"
@@ -558,6 +559,7 @@ Shell::~Shell() {
wm_shell_->RemoveShellObserver(projecting_observer_.get());
}
display_change_observer_.reset();
+ shutdown_observer_.reset();
PowerStatus::Shutdown();
@@ -620,7 +622,12 @@ void Shell::Init(const ShellInitParams& init_params) {
wm_shell_->AddShellObserver(projecting_observer_.get());
if (!display_initialized && base::SysInfo::IsRunningOnChromeOS()) {
- display_change_observer_.reset(new DisplayChangeObserver);
+ display_change_observer_ = base::MakeUnique<DisplayChangeObserver>(
+ display_configurator_.get(), display_manager_.get());
+
+ shutdown_observer_ =
+ base::MakeUnique<ShutdownObserver>(display_configurator_.get());
+
// Register |display_change_observer_| first so that the rest of
// observer gets invoked after the root windows are configured.
display_configurator_->AddObserver(display_change_observer_.get());
« no previous file with comments | « ash/shell.h ('k') | ash/system/chromeos/screen_layout_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698