Chromium Code Reviews| Index: services/ui/display/platform_screen_impl_ozone.cc |
| diff --git a/services/ui/display/platform_screen_impl_ozone.cc b/services/ui/display/platform_screen_impl_ozone.cc |
| index 5f36de6395020f1a18528a57922f0ecbcb6b6068..eed0269f9f9b677e5f16679f7071d0d35f5e6543 100644 |
| --- a/services/ui/display/platform_screen_impl_ozone.cc |
| +++ b/services/ui/display/platform_screen_impl_ozone.cc |
| @@ -4,6 +4,7 @@ |
| #include "services/ui/display/platform_screen_impl_ozone.h" |
| +#include "base/command_line.h" |
| #include "base/memory/ptr_util.h" |
| #include "base/sys_info.h" |
| #include "base/threading/thread_task_runner_handle.h" |
| @@ -28,7 +29,13 @@ namespace { |
| // ConfigurePhysicalDisplay() with a hard-coded |id| and |bounds|. |
| void FixedSizeScreenConfiguration( |
| const PlatformScreen::ConfiguredDisplayCallback& callback) { |
| - callback.Run(1, gfx::Rect(1024, 768)); |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch("multi-display")) { |
| + // This really doesn't work properly. Use at your own risk. |
| + callback.Run(100, gfx::Rect(800, 800)); |
| + callback.Run(200, gfx::Rect(800, 0, 800, 800)); |
| + } else { |
| + callback.Run(100, gfx::Rect(0, 0, 1024, 768)); |
| + } |
| } |
| // Needed for DisplayConfigurator::ForceInitialConfigure. |
| @@ -67,10 +74,13 @@ void PlatformScreenImplOzone::ConfigurePhysicalDisplay( |
| void PlatformScreenImplOzone::OnDisplayModeChanged( |
| const ui::DisplayConfigurator::DisplayStateList& displays) { |
| - // TODO(kylechar): Remove checks when multiple display support is added. |
| - CHECK(displays.size() == 1) << "Mus only supports one 1 display"; |
| + // TODO(kylechar): Remove check when adding/removing displays is supported. |
| CHECK(!callback_.is_null()); |
| + if (displays.size() > 1) |
|
sky
2016/07/27 15:36:43
Add {}
kylechar
2016/07/27 17:25:55
Done.
|
| + LOG(ERROR) |
| + << "Mus doesn't really support multiple displays, expect it to crash"; |
| + |
| gfx::Point origin; |
| for (auto display : displays) { |
| const ui::DisplayMode* current_mode = display->current_mode(); |