Index: ash/display/display_manager.cc |
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc |
index 5d47aba7a1534431d437fe40ee3fdbf921fc3f84..e4ecf0217637b7d819deabaf4cb66c01c65038b2 100644 |
--- a/ash/display/display_manager.cc |
+++ b/ash/display/display_manager.cc |
@@ -146,14 +146,11 @@ DisplayManager::DisplayManager() |
unified_desktop_enabled_ = base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kAshEnableUnifiedDesktop); |
#endif |
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get()); |
- gfx::Screen* current_native = |
- gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE); |
+ gfx::Screen* current = gfx::Screen::GetScreen(); |
// If there is no native, or the native was for shutdown, |
// use ash's screen. |
- if (!current_native || |
- current_native == screen_for_shutdown) { |
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); |
+ if (!current || current == screen_for_shutdown) { |
+ gfx::Screen::SetScreenInstance(screen_.get()); |
} |
} |
@@ -1078,16 +1075,9 @@ scoped_ptr<MouseWarpController> DisplayManager::CreateMouseWarpController( |
} |
void DisplayManager::CreateScreenForShutdown() const { |
- bool native_is_ash = |
- gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE) == screen_.get(); |
delete screen_for_shutdown; |
screen_for_shutdown = screen_->CloneForShutdown(); |
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, |
- screen_for_shutdown); |
- if (native_is_ash) { |
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
- screen_for_shutdown); |
- } |
+ gfx::Screen::SetScreenInstance(screen_for_shutdown); |
} |
void DisplayManager::UpdateInternalDisplayModeListForTest() { |