| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/ui/display/screen_manager_ozone.h" | 5 #include "services/ui/display/screen_manager_ozone_internal.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "chromeos/system/devicemode.h" | 13 #include "chromeos/system/devicemode.h" |
| 14 #include "services/service_manager/public/cpp/interface_registry.h" | 14 #include "services/service_manager/public/cpp/interface_registry.h" |
| 15 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 DCHECK(placement); | 48 DCHECK(placement); |
| 49 SwapRecursive(id_to_placement, current_primary_id, | 49 SwapRecursive(id_to_placement, current_primary_id, |
| 50 placement->parent_display_id); | 50 placement->parent_display_id); |
| 51 placement->Swap(); | 51 placement->Swap(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 // static | 56 // static |
| 57 std::unique_ptr<ScreenManager> ScreenManager::Create() { | 57 std::unique_ptr<ScreenManager> ScreenManager::Create() { |
| 58 return base::MakeUnique<ScreenManagerOzone>(); | 58 return base::MakeUnique<ScreenManagerOzoneInternal>(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 ScreenManagerOzone::ScreenManagerOzone() {} | 61 ScreenManagerOzoneInternal::ScreenManagerOzoneInternal() {} |
| 62 | 62 |
| 63 ScreenManagerOzone::~ScreenManagerOzone() { | 63 ScreenManagerOzoneInternal::~ScreenManagerOzoneInternal() { |
| 64 // We are shutting down and don't want to make anymore display changes. | 64 // We are shutting down and don't want to make anymore display changes. |
| 65 fake_display_controller_ = nullptr; | 65 fake_display_controller_ = nullptr; |
| 66 | 66 |
| 67 touch_transform_controller_.reset(); | 67 touch_transform_controller_.reset(); |
| 68 | 68 |
| 69 if (display_manager_) | 69 if (display_manager_) |
| 70 display_manager_->RemoveObserver(this); | 70 display_manager_->RemoveObserver(this); |
| 71 | 71 |
| 72 if (display_change_observer_) { | 72 if (display_change_observer_) { |
| 73 display_configurator_.RemoveObserver(display_change_observer_.get()); | 73 display_configurator_.RemoveObserver(display_change_observer_.get()); |
| 74 display_change_observer_.reset(); | 74 display_change_observer_.reset(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (display_manager_) | 77 if (display_manager_) |
| 78 display_manager_.reset(); | 78 display_manager_.reset(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ScreenManagerOzone::SetPrimaryDisplayId(int64_t display_id) { | 81 void ScreenManagerOzoneInternal::SetPrimaryDisplayId(int64_t display_id) { |
| 82 DCHECK_NE(kInvalidDisplayId, display_id); | 82 DCHECK_NE(kInvalidDisplayId, display_id); |
| 83 if (primary_display_id_ == display_id) | 83 if (primary_display_id_ == display_id) |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 const Display& new_primary_display = | 86 const Display& new_primary_display = |
| 87 display_manager_->GetDisplayForId(display_id); | 87 display_manager_->GetDisplayForId(display_id); |
| 88 if (!new_primary_display.is_valid()) { | 88 if (!new_primary_display.is_valid()) { |
| 89 LOG(ERROR) << "Invalid or non-existent display is requested:" | 89 LOG(ERROR) << "Invalid or non-existent display is requested:" |
| 90 << new_primary_display.ToString(); | 90 << new_primary_display.ToString(); |
| 91 return; | 91 return; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Force updating display bounds for new primary display. | 125 // Force updating display bounds for new primary display. |
| 126 display_manager_->set_force_bounds_changed(true); | 126 display_manager_->set_force_bounds_changed(true); |
| 127 display_manager_->UpdateDisplays(); | 127 display_manager_->UpdateDisplays(); |
| 128 display_manager_->set_force_bounds_changed(false); | 128 display_manager_->set_force_bounds_changed(false); |
| 129 | 129 |
| 130 DVLOG(1) << "Primary display changed from " << old_primary_display_id | 130 DVLOG(1) << "Primary display changed from " << old_primary_display_id |
| 131 << " to " << primary_display_id_; | 131 << " to " << primary_display_id_; |
| 132 delegate_->OnPrimaryDisplayChanged(primary_display_id_); | 132 delegate_->OnPrimaryDisplayChanged(primary_display_id_); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void ScreenManagerOzone::AddInterfaces( | 135 void ScreenManagerOzoneInternal::AddInterfaces( |
| 136 service_manager::InterfaceRegistry* registry) { | 136 service_manager::InterfaceRegistry* registry) { |
| 137 registry->AddInterface<mojom::DisplayController>(this); | 137 registry->AddInterface<mojom::DisplayController>(this); |
| 138 registry->AddInterface<mojom::TestDisplayController>(this); | 138 registry->AddInterface<mojom::TestDisplayController>(this); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void ScreenManagerOzone::Init(ScreenManagerDelegate* delegate) { | 141 void ScreenManagerOzoneInternal::Init(ScreenManagerDelegate* delegate) { |
| 142 DCHECK(delegate); | 142 DCHECK(delegate); |
| 143 delegate_ = delegate; | 143 delegate_ = delegate; |
| 144 | 144 |
| 145 // Tests may inject a NativeDisplayDelegate, otherwise get it from | 145 // Tests may inject a NativeDisplayDelegate, otherwise get it from |
| 146 // OzonePlatform. | 146 // OzonePlatform. |
| 147 if (!native_display_delegate_) { | 147 if (!native_display_delegate_) { |
| 148 native_display_delegate_ = | 148 native_display_delegate_ = |
| 149 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); | 149 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); |
| 150 } | 150 } |
| 151 | 151 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 181 display_configurator_.set_mirroring_controller(display_manager_.get()); | 181 display_configurator_.set_mirroring_controller(display_manager_.get()); |
| 182 | 182 |
| 183 // Perform initial configuration. | 183 // Perform initial configuration. |
| 184 display_configurator_.Init(std::move(native_display_delegate_), false); | 184 display_configurator_.Init(std::move(native_display_delegate_), false); |
| 185 display_configurator_.ForceInitialConfigure(kChromeOsBootColor); | 185 display_configurator_.ForceInitialConfigure(kChromeOsBootColor); |
| 186 | 186 |
| 187 touch_transform_controller_ = base::MakeUnique<TouchTransformController>( | 187 touch_transform_controller_ = base::MakeUnique<TouchTransformController>( |
| 188 &display_configurator_, display_manager_.get()); | 188 &display_configurator_, display_manager_.get()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void ScreenManagerOzone::RequestCloseDisplay(int64_t display_id) { | 191 void ScreenManagerOzoneInternal::RequestCloseDisplay(int64_t display_id) { |
| 192 if (!fake_display_controller_) | 192 if (!fake_display_controller_) |
| 193 return; | 193 return; |
| 194 | 194 |
| 195 // Tell the NDD to remove the display. ScreenManager will get an update | 195 // Tell the NDD to remove the display. ScreenManager will get an update |
| 196 // that the display configuration has changed and the display will be gone. | 196 // that the display configuration has changed and the display will be gone. |
| 197 fake_display_controller_->RemoveDisplay(display_id); | 197 fake_display_controller_->RemoveDisplay(display_id); |
| 198 } | 198 } |
| 199 | 199 |
| 200 int64_t ScreenManagerOzone::GetPrimaryDisplayId() const { | 200 int64_t ScreenManagerOzoneInternal::GetPrimaryDisplayId() const { |
| 201 return primary_display_id_; | 201 return primary_display_id_; |
| 202 } | 202 } |
| 203 | 203 |
| 204 void ScreenManagerOzone::ToggleAddRemoveDisplay() { | 204 void ScreenManagerOzoneInternal::ToggleAddRemoveDisplay() { |
| 205 if (!fake_display_controller_) | 205 if (!fake_display_controller_) |
| 206 return; | 206 return; |
| 207 DVLOG(1) << "ToggleAddRemoveDisplay"; | 207 DVLOG(1) << "ToggleAddRemoveDisplay"; |
| 208 | 208 |
| 209 int num_displays = display_manager_->GetNumDisplays(); | 209 int num_displays = display_manager_->GetNumDisplays(); |
| 210 if (num_displays == 1) { | 210 if (num_displays == 1) { |
| 211 const gfx::Size& pixel_size = | 211 const gfx::Size& pixel_size = |
| 212 display_manager_->GetDisplayInfo(display_manager_->GetDisplayAt(0).id()) | 212 display_manager_->GetDisplayInfo(display_manager_->GetDisplayAt(0).id()) |
| 213 .bounds_in_native() | 213 .bounds_in_native() |
| 214 .size(); | 214 .size(); |
| 215 fake_display_controller_->AddDisplay(pixel_size); | 215 fake_display_controller_->AddDisplay(pixel_size); |
| 216 } else if (num_displays > 1) { | 216 } else if (num_displays > 1) { |
| 217 DisplayIdList displays = display_manager_->GetCurrentDisplayIdList(); | 217 DisplayIdList displays = display_manager_->GetCurrentDisplayIdList(); |
| 218 fake_display_controller_->RemoveDisplay(displays.back()); | 218 fake_display_controller_->RemoveDisplay(displays.back()); |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 void ScreenManagerOzone::ToggleDisplayResolution() { | 222 void ScreenManagerOzoneInternal::ToggleDisplayResolution() { |
| 223 if (primary_display_id_ == kInvalidDisplayId) | 223 if (primary_display_id_ == kInvalidDisplayId) |
| 224 return; | 224 return; |
| 225 | 225 |
| 226 // Internal displays don't have alternate resolutions. | 226 // Internal displays don't have alternate resolutions. |
| 227 if (Display::HasInternalDisplay() && | 227 if (Display::HasInternalDisplay() && |
| 228 primary_display_id_ == Display::InternalDisplayId()) | 228 primary_display_id_ == Display::InternalDisplayId()) |
| 229 return; | 229 return; |
| 230 | 230 |
| 231 DVLOG(1) << "ToggleDisplayResolution"; | 231 DVLOG(1) << "ToggleDisplayResolution"; |
| 232 | 232 |
| 233 const ManagedDisplayInfo& info = | 233 const ManagedDisplayInfo& info = |
| 234 display_manager_->GetDisplayInfo(primary_display_id_); | 234 display_manager_->GetDisplayInfo(primary_display_id_); |
| 235 scoped_refptr<ManagedDisplayMode> mode = | 235 scoped_refptr<ManagedDisplayMode> mode = |
| 236 GetDisplayModeForNextResolution(info, true); | 236 GetDisplayModeForNextResolution(info, true); |
| 237 | 237 |
| 238 // Loop back to first mode from last. | 238 // Loop back to first mode from last. |
| 239 if (mode->size() == info.bounds_in_native().size()) | 239 if (mode->size() == info.bounds_in_native().size()) |
| 240 mode = info.display_modes()[0]; | 240 mode = info.display_modes()[0]; |
| 241 | 241 |
| 242 // Set mode only if it's different from current. | 242 // Set mode only if it's different from current. |
| 243 if (mode->size() != info.bounds_in_native().size()) | 243 if (mode->size() != info.bounds_in_native().size()) |
| 244 display_manager_->SetDisplayMode(primary_display_id_, mode); | 244 display_manager_->SetDisplayMode(primary_display_id_, mode); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void ScreenManagerOzone::IncreaseInternalDisplayZoom() { | 247 void ScreenManagerOzoneInternal::IncreaseInternalDisplayZoom() { |
| 248 if (Display::HasInternalDisplay()) | 248 if (Display::HasInternalDisplay()) |
| 249 display_manager_->ZoomInternalDisplay(false); | 249 display_manager_->ZoomInternalDisplay(false); |
| 250 } | 250 } |
| 251 | 251 |
| 252 void ScreenManagerOzone::DecreaseInternalDisplayZoom() { | 252 void ScreenManagerOzoneInternal::DecreaseInternalDisplayZoom() { |
| 253 if (Display::HasInternalDisplay()) | 253 if (Display::HasInternalDisplay()) |
| 254 display_manager_->ZoomInternalDisplay(true); | 254 display_manager_->ZoomInternalDisplay(true); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void ScreenManagerOzone::ResetInternalDisplayZoom() { | 257 void ScreenManagerOzoneInternal::ResetInternalDisplayZoom() { |
| 258 if (Display::HasInternalDisplay()) | 258 if (Display::HasInternalDisplay()) |
| 259 display_manager_->ResetInternalDisplayZoom(); | 259 display_manager_->ResetInternalDisplayZoom(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void ScreenManagerOzone::RotateCurrentDisplayCW() { | 262 void ScreenManagerOzoneInternal::RotateCurrentDisplayCW() { |
| 263 NOTIMPLEMENTED(); | 263 NOTIMPLEMENTED(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void ScreenManagerOzone::SwapPrimaryDisplay() { | 266 void ScreenManagerOzoneInternal::SwapPrimaryDisplay() { |
| 267 // Can't swap if there is only 1 display and swapping isn't supported for 3 or | 267 // Can't swap if there is only 1 display and swapping isn't supported for 3 or |
| 268 // more displays. | 268 // more displays. |
| 269 if (display_manager_->GetNumDisplays() != 2) | 269 if (display_manager_->GetNumDisplays() != 2) |
| 270 return; | 270 return; |
| 271 | 271 |
| 272 DVLOG(1) << "SwapPrimaryDisplay()"; | 272 DVLOG(1) << "SwapPrimaryDisplay()"; |
| 273 | 273 |
| 274 DisplayIdList display_ids = display_manager_->GetCurrentDisplayIdList(); | 274 DisplayIdList display_ids = display_manager_->GetCurrentDisplayIdList(); |
| 275 | 275 |
| 276 // Find the next primary display. | 276 // Find the next primary display. |
| 277 if (primary_display_id_ == display_ids[0]) | 277 if (primary_display_id_ == display_ids[0]) |
| 278 SetPrimaryDisplayId(display_ids[1]); | 278 SetPrimaryDisplayId(display_ids[1]); |
| 279 else | 279 else |
| 280 SetPrimaryDisplayId(display_ids[0]); | 280 SetPrimaryDisplayId(display_ids[0]); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void ScreenManagerOzone::ToggleMirrorMode() { | 283 void ScreenManagerOzoneInternal::ToggleMirrorMode() { |
| 284 NOTIMPLEMENTED(); | 284 NOTIMPLEMENTED(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 void ScreenManagerOzone::SetDisplayWorkArea(int64_t display_id, | 287 void ScreenManagerOzoneInternal::SetDisplayWorkArea(int64_t display_id, |
| 288 const gfx::Size& size, | 288 const gfx::Size& size, |
| 289 const gfx::Insets& insets) { | 289 const gfx::Insets& insets) { |
| 290 // TODO(kylechar): Check the size of the display matches the current size. | 290 // TODO(kylechar): Check the size of the display matches the current size. |
| 291 display_manager_->UpdateWorkAreaOfDisplay(display_id, insets); | 291 display_manager_->UpdateWorkAreaOfDisplay(display_id, insets); |
| 292 } | 292 } |
| 293 | 293 |
| 294 void ScreenManagerOzone::TakeDisplayControl( | 294 void ScreenManagerOzoneInternal::TakeDisplayControl( |
| 295 const TakeDisplayControlCallback& callback) { | 295 const TakeDisplayControlCallback& callback) { |
| 296 display_configurator_.TakeControl(callback); | 296 display_configurator_.TakeControl(callback); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void ScreenManagerOzone::RelinquishDisplayControl( | 299 void ScreenManagerOzoneInternal::RelinquishDisplayControl( |
| 300 const RelinquishDisplayControlCallback& callback) { | 300 const RelinquishDisplayControlCallback& callback) { |
| 301 display_configurator_.RelinquishControl(callback); | 301 display_configurator_.RelinquishControl(callback); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void ScreenManagerOzone::OnDisplayAdded(const Display& display) { | 304 void ScreenManagerOzoneInternal::OnDisplayAdded(const Display& display) { |
| 305 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); | 305 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); |
| 306 DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n " | 306 DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n " |
| 307 << metrics.ToString(); | 307 << metrics.ToString(); |
| 308 screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY); | 308 screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY); |
| 309 delegate_->OnDisplayAdded(display.id(), metrics); | 309 delegate_->OnDisplayAdded(display.id(), metrics); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void ScreenManagerOzone::OnDisplayRemoved(const Display& display) { | 312 void ScreenManagerOzoneInternal::OnDisplayRemoved(const Display& display) { |
| 313 // TODO(kylechar): If we're removing the primary display we need to first set | 313 // TODO(kylechar): If we're removing the primary display we need to first set |
| 314 // a new primary display. This will crash until then. | 314 // a new primary display. This will crash until then. |
| 315 | 315 |
| 316 DVLOG(1) << "OnDisplayRemoved: " << display.ToString(); | 316 DVLOG(1) << "OnDisplayRemoved: " << display.ToString(); |
| 317 screen_->display_list().RemoveDisplay(display.id()); | 317 screen_->display_list().RemoveDisplay(display.id()); |
| 318 delegate_->OnDisplayRemoved(display.id()); | 318 delegate_->OnDisplayRemoved(display.id()); |
| 319 } | 319 } |
| 320 | 320 |
| 321 void ScreenManagerOzone::OnDisplayMetricsChanged(const Display& display, | 321 void ScreenManagerOzoneInternal::OnDisplayMetricsChanged( |
| 322 uint32_t changed_metrics) { | 322 const Display& display, |
| 323 uint32_t changed_metrics) { |
| 323 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); | 324 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); |
| 324 DVLOG(1) << "OnDisplayModified: " << display.ToString() << "\n " | 325 DVLOG(1) << "OnDisplayModified: " << display.ToString() << "\n " |
| 325 << metrics.ToString(); | 326 << metrics.ToString(); |
| 326 screen_->display_list().UpdateDisplay(display); | 327 screen_->display_list().UpdateDisplay(display); |
| 327 delegate_->OnDisplayModified(display.id(), metrics); | 328 delegate_->OnDisplayModified(display.id(), metrics); |
| 328 } | 329 } |
| 329 | 330 |
| 330 ViewportMetrics ScreenManagerOzone::GetViewportMetricsForDisplay( | 331 ViewportMetrics ScreenManagerOzoneInternal::GetViewportMetricsForDisplay( |
| 331 const Display& display) { | 332 const Display& display) { |
| 332 const ManagedDisplayInfo& managed_info = | 333 const ManagedDisplayInfo& managed_info = |
| 333 display_manager_->GetDisplayInfo(display.id()); | 334 display_manager_->GetDisplayInfo(display.id()); |
| 334 | 335 |
| 335 ViewportMetrics metrics; | 336 ViewportMetrics metrics; |
| 336 metrics.bounds = display.bounds(); | 337 metrics.bounds = display.bounds(); |
| 337 metrics.work_area = display.work_area(); | 338 metrics.work_area = display.work_area(); |
| 338 metrics.pixel_size = managed_info.bounds_in_native().size(); | 339 metrics.pixel_size = managed_info.bounds_in_native().size(); |
| 339 metrics.rotation = display.rotation(); | 340 metrics.rotation = display.rotation(); |
| 340 metrics.touch_support = display.touch_support(); | 341 metrics.touch_support = display.touch_support(); |
| 341 metrics.device_scale_factor = display.device_scale_factor(); | 342 metrics.device_scale_factor = display.device_scale_factor(); |
| 342 metrics.ui_scale_factor = managed_info.configured_ui_scale(); | 343 metrics.ui_scale_factor = managed_info.configured_ui_scale(); |
| 343 | 344 |
| 344 return metrics; | 345 return metrics; |
| 345 } | 346 } |
| 346 | 347 |
| 347 void ScreenManagerOzone::CreateOrUpdateMirroringDisplay( | 348 void ScreenManagerOzoneInternal::CreateOrUpdateMirroringDisplay( |
| 348 const DisplayInfoList& display_info_list) { | 349 const DisplayInfoList& display_info_list) { |
| 349 NOTIMPLEMENTED(); | 350 NOTIMPLEMENTED(); |
| 350 } | 351 } |
| 351 | 352 |
| 352 void ScreenManagerOzone::CloseMirroringDisplayIfNotNecessary() { | 353 void ScreenManagerOzoneInternal::CloseMirroringDisplayIfNotNecessary() { |
| 353 NOTIMPLEMENTED(); | 354 NOTIMPLEMENTED(); |
| 354 } | 355 } |
| 355 | 356 |
| 356 void ScreenManagerOzone::PreDisplayConfigurationChange(bool clear_focus) { | 357 void ScreenManagerOzoneInternal::PreDisplayConfigurationChange( |
| 358 bool clear_focus) { |
| 357 DVLOG(1) << "PreDisplayConfigurationChange"; | 359 DVLOG(1) << "PreDisplayConfigurationChange"; |
| 358 } | 360 } |
| 359 | 361 |
| 360 void ScreenManagerOzone::PostDisplayConfigurationChange( | 362 void ScreenManagerOzoneInternal::PostDisplayConfigurationChange( |
| 361 bool must_clear_window) { | 363 bool must_clear_window) { |
| 362 // Set primary display if not set yet. | 364 // Set primary display if not set yet. |
| 363 if (primary_display_id_ == kInvalidDisplayId) { | 365 if (primary_display_id_ == kInvalidDisplayId) { |
| 364 const Display& primary_display = | 366 const Display& primary_display = |
| 365 display_manager_->GetPrimaryDisplayCandidate(); | 367 display_manager_->GetPrimaryDisplayCandidate(); |
| 366 if (primary_display.is_valid()) { | 368 if (primary_display.is_valid()) { |
| 367 primary_display_id_ = primary_display.id(); | 369 primary_display_id_ = primary_display.id(); |
| 368 DVLOG(1) << "Set primary display to " << primary_display_id_; | 370 DVLOG(1) << "Set primary display to " << primary_display_id_; |
| 369 screen_->display_list().UpdateDisplay(primary_display, | 371 screen_->display_list().UpdateDisplay(primary_display, |
| 370 DisplayList::Type::PRIMARY); | 372 DisplayList::Type::PRIMARY); |
| 371 delegate_->OnPrimaryDisplayChanged(primary_display_id_); | 373 delegate_->OnPrimaryDisplayChanged(primary_display_id_); |
| 372 } | 374 } |
| 373 } | 375 } |
| 374 | 376 |
| 375 touch_transform_controller_->UpdateTouchTransforms(); | 377 touch_transform_controller_->UpdateTouchTransforms(); |
| 376 | 378 |
| 377 DVLOG(1) << "PostDisplayConfigurationChange"; | 379 DVLOG(1) << "PostDisplayConfigurationChange"; |
| 378 } | 380 } |
| 379 | 381 |
| 380 DisplayConfigurator* ScreenManagerOzone::display_configurator() { | 382 DisplayConfigurator* ScreenManagerOzoneInternal::display_configurator() { |
| 381 return &display_configurator_; | 383 return &display_configurator_; |
| 382 } | 384 } |
| 383 | 385 |
| 384 void ScreenManagerOzone::Create( | 386 void ScreenManagerOzoneInternal::Create( |
| 385 const service_manager::Identity& remote_identity, | 387 const service_manager::Identity& remote_identity, |
| 386 mojom::DisplayControllerRequest request) { | 388 mojom::DisplayControllerRequest request) { |
| 387 controller_bindings_.AddBinding(this, std::move(request)); | 389 controller_bindings_.AddBinding(this, std::move(request)); |
| 388 } | 390 } |
| 389 | 391 |
| 390 void ScreenManagerOzone::Create( | 392 void ScreenManagerOzoneInternal::Create( |
| 391 const service_manager::Identity& remote_identity, | 393 const service_manager::Identity& remote_identity, |
| 392 mojom::TestDisplayControllerRequest request) { | 394 mojom::TestDisplayControllerRequest request) { |
| 393 test_bindings_.AddBinding(this, std::move(request)); | 395 test_bindings_.AddBinding(this, std::move(request)); |
| 394 } | 396 } |
| 395 | 397 |
| 396 } // namespace display | 398 } // namespace display |
| OLD | NEW |