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

Unified Diff: ash/display/display_manager.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: fixes Created 4 years, 11 months 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 | « no previous file | ash/display/display_manager_unittest.cc » ('j') | ash/shell.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
sky 2016/01/19 22:47:54 nit: nuke {}
scottmg 2016/01/20 00:52:57 Done.
+ 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() {
« no previous file with comments | « no previous file | ash/display/display_manager_unittest.cc » ('j') | ash/shell.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698