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

Unified Diff: services/ui/display/screen_manager_ozone_internal.cc

Issue 2736943003: Start to decouple display::Display from ws::PlatformDisplay. (Closed)
Patch Set: Fix comments. Created 3 years, 9 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: services/ui/display/screen_manager_ozone_internal.cc
diff --git a/services/ui/display/screen_manager_ozone_internal.cc b/services/ui/display/screen_manager_ozone_internal.cc
index d175cee4569d6ca7653470f1f146c558a5fdd354..947a3de34ba93619b255aa4d159e9188f4898525 100644
--- a/services/ui/display/screen_manager_ozone_internal.cc
+++ b/services/ui/display/screen_manager_ozone_internal.cc
@@ -308,7 +308,7 @@ void ScreenManagerOzoneInternal::OnDisplayAdded(const Display& display) {
DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n "
<< metrics.ToString();
screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY);
- delegate_->OnDisplayAdded(display.id(), metrics);
+ delegate_->OnDisplayAdded(display, metrics);
}
void ScreenManagerOzoneInternal::OnDisplayRemoved(const Display& display) {
@@ -327,7 +327,7 @@ void ScreenManagerOzoneInternal::OnDisplayMetricsChanged(
DVLOG(1) << "OnDisplayModified: " << display.ToString() << "\n "
<< metrics.ToString();
screen_->display_list().UpdateDisplay(display);
- delegate_->OnDisplayModified(display.id(), metrics);
+ delegate_->OnDisplayModified(display, metrics);
}
ViewportMetrics ScreenManagerOzoneInternal::GetViewportMetricsForDisplay(
@@ -336,11 +336,9 @@ ViewportMetrics ScreenManagerOzoneInternal::GetViewportMetricsForDisplay(
display_manager_->GetDisplayInfo(display.id());
ViewportMetrics metrics;
- metrics.bounds = display.bounds();
- metrics.work_area = display.work_area();
- metrics.pixel_size = managed_info.bounds_in_native().size();
- metrics.rotation = display.rotation();
- metrics.touch_support = display.touch_support();
+ // TODO(kylechar): The origin of |metrics.bounds_in_pixels| should be updated
+ // so that PlatformWindows appear next to one another for multiple displays.
+ metrics.bounds_in_pixels = managed_info.bounds_in_native();
metrics.device_scale_factor = display.device_scale_factor();
metrics.ui_scale_factor = managed_info.configured_ui_scale();
« no previous file with comments | « services/ui/display/screen_manager_delegate.h ('k') | services/ui/display/screen_manager_ozone_internal_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698