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

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

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Wrap comment 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 5d6eea13b6cf51bb15dc4494feaad4f45fb6bddd..2004c992da766dde3de4a951bdb1a49fee3c3626 100644
--- a/services/ui/display/platform_screen_ozone.cc
+++ b/services/ui/display/platform_screen_ozone.cc
@@ -67,7 +67,8 @@ void PlatformScreenOzone::AddInterfaces(
registry->AddInterface<mojom::TestDisplayController>(this);
}
-void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate) {
+void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate,
+ WindowMode window_mode) {
DCHECK(delegate);
delegate_ = delegate;
@@ -81,13 +82,15 @@ 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 (window_mode == WINDOW_MODE_INTERNAL) {
+ // 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