| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ws/display.h" | 5 #include "services/ui/ws/display.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 DisplayManager* Display::display_manager() { | 84 DisplayManager* Display::display_manager() { |
| 85 return window_server_->display_manager(); | 85 return window_server_->display_manager(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 const DisplayManager* Display::display_manager() const { | 88 const DisplayManager* Display::display_manager() const { |
| 89 return window_server_->display_manager(); | 89 return window_server_->display_manager(); |
| 90 } | 90 } |
| 91 | 91 |
| 92 mojom::WsDisplayPtr Display::ToWsDisplay() const { | |
| 93 mojom::WsDisplayPtr display_ptr = mojom::WsDisplay::New(); | |
| 94 | |
| 95 display_ptr->display = ToDisplay(); | |
| 96 display_ptr->is_primary = platform_display_->IsPrimaryDisplay(); | |
| 97 | |
| 98 // TODO(sky): make this real. | |
| 99 display_ptr->frame_decoration_values = mojom::FrameDecorationValues::New(); | |
| 100 return display_ptr; | |
| 101 } | |
| 102 | |
| 103 display::Display Display::ToDisplay() const { | 92 display::Display Display::ToDisplay() const { |
| 104 display::Display display(GetId()); | 93 display::Display display(GetId()); |
| 105 | 94 |
| 106 const display::ViewportMetrics& metrics = | 95 const display::ViewportMetrics& metrics = |
| 107 platform_display_->GetViewportMetrics(); | 96 platform_display_->GetViewportMetrics(); |
| 108 | 97 |
| 109 display.set_bounds(metrics.bounds); | 98 display.set_bounds(metrics.bounds); |
| 110 display.set_work_area(metrics.work_area); | 99 display.set_work_area(metrics.work_area); |
| 111 display.set_device_scale_factor(metrics.device_scale_factor); | 100 display.set_device_scale_factor(metrics.device_scale_factor); |
| 112 display.set_rotation(metrics.rotation); | 101 display.set_rotation(metrics.rotation); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 389 } |
| 401 | 390 |
| 402 void Display::OnWindowManagerWindowTreeFactoryReady( | 391 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 403 WindowManagerWindowTreeFactory* factory) { | 392 WindowManagerWindowTreeFactory* factory) { |
| 404 if (!binding_) | 393 if (!binding_) |
| 405 CreateWindowManagerDisplayRootFromFactory(factory); | 394 CreateWindowManagerDisplayRootFromFactory(factory); |
| 406 } | 395 } |
| 407 | 396 |
| 408 } // namespace ws | 397 } // namespace ws |
| 409 } // namespace ui | 398 } // namespace ui |
| OLD | NEW |