diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 18:24:33 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 18:24:33 +0000 |
commit | 55ad8c14c31df30801d8422e81b78322f95c0526 (patch) | |
tree | c0fe47685194fd2137c658944589c439d93b0c8b /ash/shell.cc | |
parent | f3eccd0dfd02eb6b32c1a233e28439fc1a241d65 (diff) | |
download | chromium_src-55ad8c14c31df30801d8422e81b78322f95c0526.zip chromium_src-55ad8c14c31df30801d8422e81b78322f95c0526.tar.gz chromium_src-55ad8c14c31df30801d8422e81b78322f95c0526.tar.bz2 |
Screen cleanup:
* Split ScreenAsh to ScreenUtil (set of utility functions) and the screen implementation.
* moved screen_ash from Shell to DisplayManager. Ash specific imp is now hidden in DisplayManager.
* Shell now creates a separate screen object which simply keeps the list of displays for shutdown. This allow all screen operation valid during shutdown.
BUG=None
TBR=hongbo.min@intel.com,sky@chromium.org
Review URL: https://codereview.chromium.org/138003007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r-- | ash/shell.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 6845d4a..5e81698 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -36,7 +36,6 @@ #include "ash/media_delegate.h" #include "ash/new_window_delegate.h" #include "ash/root_window_controller.h" -#include "ash/screen_ash.h" #include "ash/session_state_delegate.h" #include "ash/shelf/app_list_shelf_item_delegate.h" #include "ash/shelf/shelf_delegate.h" @@ -83,7 +82,6 @@ #include "ash/wm/workspace_controller.h" #include "base/bind.h" #include "base/command_line.h" -#include "base/debug/leak_annotations.h" #include "base/debug/trace_event.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/client/user_action_client.h" @@ -569,8 +567,7 @@ void Shell::SetGPUSupport(scoped_ptr<GPUSupport> gpu_support) { // Shell, private: Shell::Shell(ShellDelegate* delegate) - : screen_(new ScreenAsh), - target_root_window_(NULL), + : target_root_window_(NULL), scoped_target_root_window_(NULL), delegate_(delegate), window_positioner_(new WindowPositioner), @@ -586,11 +583,6 @@ Shell::Shell(ShellDelegate* delegate) gpu_support_(new DefaultGPUSupportImpl) { DCHECK(delegate_.get()); display_manager_.reset(new internal::DisplayManager); - - ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 - gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); - if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) - gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); display_controller_.reset(new DisplayController); #if defined(OS_CHROMEOS) && defined(USE_X11) output_configurator_->Init(!gpu_support_->IsPanelFittingDisabled()); @@ -712,6 +704,7 @@ Shell::~Shell() { // This also deletes all RootWindows. Note that we invoke Shutdown() on // DisplayController before resetting |display_controller_|, since destruction // of its owned RootWindowControllers relies on the value. + display_manager_->CreateScreenForShutdown(); display_controller_->Shutdown(); display_controller_.reset(); screen_position_controller_.reset(); @@ -811,7 +804,7 @@ void Shell::Init() { resolution_notification_controller_.reset( new internal::ResolutionNotificationController); - cursor_manager_.SetDisplay(DisplayController::GetPrimaryDisplay()); + cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); nested_dispatcher_controller_.reset(new NestedDispatcherController); accelerator_controller_.reset(new AcceleratorController); |