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

Unified Diff: ui/display/manager/display_manager.cc

Issue 2476663003: PlatformScreenOzone using DisplayManager (Closed)
Patch Set: Add missing data_dep. 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 | « ui/display/manager/display_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/manager/display_manager.cc
diff --git a/ui/display/manager/display_manager.cc b/ui/display/manager/display_manager.cc
index 6d3e03ab020d8d978db535f84b075c6ddaddefaa..a50bccdcfc29aaf4d1ec1199caa983ab938e5da3 100644
--- a/ui/display/manager/display_manager.cc
+++ b/ui/display/manager/display_manager.cc
@@ -136,7 +136,8 @@ DisplayManager::DisplayManager(std::unique_ptr<Screen> screen)
layout_store_(new DisplayLayoutStore),
weak_ptr_factory_(this) {
#if defined(OS_CHROMEOS)
- change_display_upon_host_resize_ = !base::SysInfo::IsRunningOnChromeOS();
+ configure_displays_ = base::SysInfo::IsRunningOnChromeOS();
+ change_display_upon_host_resize_ = !configure_displays_;
unified_desktop_enabled_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableUnifiedDesktop);
#endif
@@ -380,7 +381,7 @@ bool DisplayManager::SetDisplayMode(
if (resolution_changed && IsInUnifiedMode()) {
ReconfigureDisplays();
#if defined(OS_CHROMEOS)
- } else if (resolution_changed && base::SysInfo::IsRunningOnChromeOS()) {
+ } else if (resolution_changed && configure_displays_) {
delegate_->display_configurator()->OnConfigurationChanged();
#endif
}
@@ -494,7 +495,7 @@ void DisplayManager::SetColorCalibrationProfile(
if (delegate_)
delegate_->PreDisplayConfigurationChange(false);
// Just sets color profile if it's not running on ChromeOS (like tests).
- if (!base::SysInfo::IsRunningOnChromeOS() ||
+ if (!configure_displays_ ||
delegate_->display_configurator()->SetColorCalibrationProfile(display_id,
profile)) {
display_info_[display_id].SetColorProfile(profile);
@@ -604,8 +605,7 @@ void DisplayManager::OnNativeDisplaysChanged(
}
#if defined(OS_CHROMEOS)
- if (!base::SysInfo::IsRunningOnChromeOS() &&
- new_display_info_list.size() > 1) {
+ if (!configure_displays_ && new_display_info_list.size() > 1) {
DisplayIdList list = GenerateDisplayIdList(
new_display_info_list.begin(), new_display_info_list.end(),
[](const ManagedDisplayInfo& info) { return info.id(); });
@@ -927,7 +927,7 @@ void DisplayManager::SetMirrorMode(bool mirror) {
return;
#if defined(OS_CHROMEOS)
- if (base::SysInfo::IsRunningOnChromeOS()) {
+ if (configure_displays_) {
ui::MultipleDisplayState new_state =
mirror ? ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR
: ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED;
« no previous file with comments | « ui/display/manager/display_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698