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

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

Issue 2445583002: Relocate display_manager from ash to ui (Closed)
Patch Set: Created 4 years, 2 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
Index: ui/display/manager/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ui/display/manager/display_manager.cc
similarity index 99%
rename from ash/display/display_manager.cc
rename to ui/display/manager/display_manager.cc
index 50aabb503ef9db6108ef075ae3b3c4ee3f7b1c7e..eb4169791892a65ba7740edb78e9014541276911 100644
--- a/ash/display/display_manager.cc
+++ b/ui/display/manager/display_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/display_manager.h"
+#include "ui/display/manager/display_manager.h"
#include <algorithm>
#include <cmath>
@@ -36,10 +36,6 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size_conversions.h"
-#if defined(USE_X11)
-#include "ui/base/x/x11_util.h" // nogncheck
-#endif
-
#if defined(OS_CHROMEOS)
#include "base/sys_info.h"
#endif
@@ -48,7 +44,7 @@
#include "base/win/windows_version.h"
#endif
-namespace ash {
+namespace display {
namespace {
@@ -272,7 +268,7 @@ void DisplayManager::SetLayoutForCurrentDisplays(
}
if (delegate_)
- delegate_->PostDisplayConfigurationChange();
+ delegate_->PostDisplayConfigurationChange(false);
}
const display::Display& DisplayManager::GetDisplayForId(int64_t id) const {
@@ -481,7 +477,7 @@ void DisplayManager::RegisterDisplayRotationProperties(
registered_internal_display_rotation_lock_ = rotation_lock;
registered_internal_display_rotation_ = rotation;
if (delegate_)
- delegate_->PostDisplayConfigurationChange();
+ delegate_->PostDisplayConfigurationChange(false);
}
scoped_refptr<display::ManagedDisplayMode>
@@ -522,7 +518,7 @@ void DisplayManager::SetColorCalibrationProfile(
ui::NUM_COLOR_PROFILES);
}
if (delegate_)
- delegate_->PostDisplayConfigurationChange();
+ delegate_->PostDisplayConfigurationChange(false);
#endif
}
@@ -849,14 +845,15 @@ void DisplayManager::UpdateDisplaysWith(
}
}
- if (delegate_)
- delegate_->PostDisplayConfigurationChange();
-
+ bool must_clear_window = false;
#if defined(USE_X11) && defined(OS_CHROMEOS)
- if (!display_changes.empty() && base::SysInfo::IsRunningOnChromeOS())
- ui::ClearX11DefaultRootWindow();
+ must_clear_window =
+ !display_changes.empty() && base::SysInfo::IsRunningOnChromeOS();
#endif
+ if (delegate_)
+ delegate_->PostDisplayConfigurationChange(must_clear_window);
+
// Create the mirroring window asynchronously after all displays
// are added so that it can mirror the display newly added. This can
// happen when switching from dock mode to software mirror mode.
@@ -1439,4 +1436,4 @@ const display::Display& DisplayManager::GetSecondaryDisplay() const {
: GetDisplayAt(0);
}
-} // namespace ash
+} // namespace display

Powered by Google App Engine
This is Rietveld 408576698