Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: services/ui/display/platform_screen_ozone.cc

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Determine external window mode in mus-ws based on if a WM is connected Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698