Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 7c36c8ef48c7c5490940813466a39ebad3366d2d..d42c788367fc4b75a397f7a5db3912163d4d4967 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -18,6 +18,7 @@ |
#include "ash/desktop_background/desktop_background_view.h" |
#include "ash/desktop_background/user_wallpaper_delegate.h" |
#include "ash/display/cursor_window_controller.h" |
+#include "ash/display/display_configuration_controller.h" |
#include "ash/display/display_manager.h" |
#include "ash/display/event_transformation_handler.h" |
#include "ash/display/mouse_cursor_event_filter.h" |
@@ -120,7 +121,6 @@ |
#include "ash/accelerators/magnifier_key_scroller.h" |
#include "ash/accelerators/spoken_feedback_toggler.h" |
#include "ash/ash_constants.h" |
-#include "ash/display/display_animator.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" |
@@ -801,6 +801,7 @@ Shell::~Shell() { |
// destruction |
// of its owned RootWindowControllers relies on the value. |
display_manager_->CreateScreenForShutdown(); |
+ display_configuration_controller_.reset(); |
window_tree_host_manager_->Shutdown(); |
window_tree_host_manager_.reset(); |
screen_position_controller_.reset(); |
@@ -814,8 +815,6 @@ Shell::~Shell() { |
display_color_manager_.reset(); |
if (display_change_observer_) |
display_configurator_->RemoveObserver(display_change_observer_.get()); |
- if (display_animator_) |
- display_configurator_->RemoveObserver(display_animator_.get()); |
if (display_error_observer_) |
display_configurator_->RemoveObserver(display_error_observer_.get()); |
if (projecting_observer_) { |
@@ -837,10 +836,12 @@ Shell::~Shell() { |
void Shell::Init(const ShellInitParams& init_params) { |
delegate_->PreInit(); |
bool display_initialized = display_manager_->InitFromCommandLine(); |
+ |
+ display_configuration_controller_.reset(new DisplayConfigurationController( |
+ display_manager_.get(), window_tree_host_manager_.get())); |
+ |
#if defined(OS_CHROMEOS) |
display_configurator_->Init(!gpu_support_->IsPanelFittingDisabled()); |
- display_animator_.reset(new DisplayAnimator()); |
- display_configurator_->AddObserver(display_animator_.get()); |
// The DBusThreadManager must outlive this Shell. See the DCHECK in ~Shell. |
chromeos::DBusThreadManager* dbus_thread_manager = |
@@ -866,6 +867,7 @@ void Shell::Init(const ShellInitParams& init_params) { |
display_color_manager_.reset( |
new DisplayColorManager(display_configurator_.get(), blocking_pool_)); |
#endif // defined(OS_CHROMEOS) |
+ |
if (!display_initialized) |
display_manager_->InitDefaultDisplay(); |