| 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.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" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 NOTIMPLEMENTED(); | 284 NOTIMPLEMENTED(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 void ScreenManagerOzone::SetDisplayWorkArea(int64_t display_id, | 287 void ScreenManagerOzone::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( |
| 295 const TakeDisplayControlCallback& callback) { |
| 296 display_configurator_.TakeControl(callback); |
| 297 } |
| 298 |
| 299 void ScreenManagerOzone::RelinquishDisplayControl( |
| 300 const RelinquishDisplayControlCallback& callback) { |
| 301 display_configurator_.RelinquishControl(callback); |
| 302 } |
| 303 |
| 294 void ScreenManagerOzone::OnDisplayAdded(const Display& display) { | 304 void ScreenManagerOzone::OnDisplayAdded(const Display& display) { |
| 295 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); | 305 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); |
| 296 DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n " | 306 DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n " |
| 297 << metrics.ToString(); | 307 << metrics.ToString(); |
| 298 screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY); | 308 screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY); |
| 299 delegate_->OnDisplayAdded(display.id(), metrics); | 309 delegate_->OnDisplayAdded(display.id(), metrics); |
| 300 } | 310 } |
| 301 | 311 |
| 302 void ScreenManagerOzone::OnDisplayRemoved(const Display& display) { | 312 void ScreenManagerOzone::OnDisplayRemoved(const Display& display) { |
| 303 // 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 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 controller_bindings_.AddBinding(this, std::move(request)); | 387 controller_bindings_.AddBinding(this, std::move(request)); |
| 378 } | 388 } |
| 379 | 389 |
| 380 void ScreenManagerOzone::Create( | 390 void ScreenManagerOzone::Create( |
| 381 const service_manager::Identity& remote_identity, | 391 const service_manager::Identity& remote_identity, |
| 382 mojom::TestDisplayControllerRequest request) { | 392 mojom::TestDisplayControllerRequest request) { |
| 383 test_bindings_.AddBinding(this, std::move(request)); | 393 test_bindings_.AddBinding(this, std::move(request)); |
| 384 } | 394 } |
| 385 | 395 |
| 386 } // namespace display | 396 } // namespace display |
| OLD | NEW |