Index: services/ui/display/platform_screen_ozone.cc |
diff --git a/services/ui/display/platform_screen_ozone.cc b/services/ui/display/platform_screen_ozone.cc |
index 3a9433d18359257a14f0e81140c148a1920dd9c7..6a85777d3436d85952ebc3928f85718cd011f53a 100644 |
--- a/services/ui/display/platform_screen_ozone.cc |
+++ b/services/ui/display/platform_screen_ozone.cc |
@@ -18,6 +18,7 @@ |
#include "ui/display/types/native_display_delegate.h" |
#include "ui/gfx/geometry/rect.h" |
#include "ui/ozone/public/ozone_platform.h" |
+#include "ui/ozone/public/ozone_switches.h" |
namespace display { |
namespace { |
@@ -68,7 +69,8 @@ void PlatformScreenOzone::AddInterfaces( |
registry->AddInterface<mojom::TestDisplayController>(this); |
} |
-void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate) { |
+void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate, |
+ bool external_window_mode) { |
DCHECK(delegate); |
delegate_ = delegate; |
@@ -82,13 +84,16 @@ void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate) { |
native_display_delegate->GetFakeDisplayController(); |
} |
- // We want display configuration to happen even off device to keep the control |
- // flow similar. |
- display_configurator_.set_configure_display(true); |
- display_configurator_.AddObserver(this); |
- display_configurator_.set_state_controller(this); |
- display_configurator_.Init(std::move(native_display_delegate), false); |
- display_configurator_.ForceInitialConfigure(kChromeOsBootColor); |
+ if (!external_window_mode) { |
+ // We want display configuration to happen even off device to keep the |
+ // control |
+ // flow similar. |
+ display_configurator_.set_configure_display(true); |
+ display_configurator_.AddObserver(this); |
+ display_configurator_.set_state_controller(this); |
+ display_configurator_.Init(std::move(native_display_delegate), false); |
+ display_configurator_.ForceInitialConfigure(kChromeOsBootColor); |
+ } |
} |
void PlatformScreenOzone::RequestCloseDisplay(int64_t display_id) { |