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_internal.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" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 void ScreenManagerOzoneInternal::RequestCloseDisplay(int64_t display_id) { | 164 void ScreenManagerOzoneInternal::RequestCloseDisplay(int64_t display_id) { |
165 if (!fake_display_controller_) | 165 if (!fake_display_controller_) |
166 return; | 166 return; |
167 | 167 |
168 // Tell the NDD to remove the display. ScreenManager will get an update | 168 // Tell the NDD to remove the display. ScreenManager will get an update |
169 // that the display configuration has changed and the display will be gone. | 169 // that the display configuration has changed and the display will be gone. |
170 fake_display_controller_->RemoveDisplay(display_id); | 170 fake_display_controller_->RemoveDisplay(display_id); |
171 } | 171 } |
172 | 172 |
| 173 display::ScreenBase* ScreenManagerOzoneInternal::GetScreen() { |
| 174 return screen_; |
| 175 } |
| 176 |
173 void ScreenManagerOzoneInternal::ToggleAddRemoveDisplay() { | 177 void ScreenManagerOzoneInternal::ToggleAddRemoveDisplay() { |
174 if (!fake_display_controller_) | 178 if (!fake_display_controller_) |
175 return; | 179 return; |
176 DVLOG(1) << "ToggleAddRemoveDisplay"; | 180 DVLOG(1) << "ToggleAddRemoveDisplay"; |
177 | 181 |
178 int num_displays = display_manager_->GetNumDisplays(); | 182 int num_displays = display_manager_->GetNumDisplays(); |
179 if (num_displays == 1) { | 183 if (num_displays == 1) { |
180 const gfx::Size& pixel_size = | 184 const gfx::Size& pixel_size = |
181 display_manager_->GetDisplayInfo(display_manager_->GetDisplayAt(0).id()) | 185 display_manager_->GetDisplayInfo(display_manager_->GetDisplayAt(0).id()) |
182 .bounds_in_native() | 186 .bounds_in_native() |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 std::move(request)); | 368 std::move(request)); |
365 } | 369 } |
366 | 370 |
367 void ScreenManagerOzoneInternal::Create( | 371 void ScreenManagerOzoneInternal::Create( |
368 const service_manager::Identity& remote_identity, | 372 const service_manager::Identity& remote_identity, |
369 mojom::TestDisplayControllerRequest request) { | 373 mojom::TestDisplayControllerRequest request) { |
370 test_bindings_.AddBinding(this, std::move(request)); | 374 test_bindings_.AddBinding(this, std::move(request)); |
371 } | 375 } |
372 | 376 |
373 } // namespace display | 377 } // namespace display |
OLD | NEW |