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

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

Issue 2345043003: Unify mustash display closing code paths. (Closed)
Patch Set: Rebase. Created 4 years, 3 months 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
« no previous file with comments | « services/ui/display/platform_screen_ozone.h ('k') | services/ui/display/platform_screen_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d973a0843b4c3cf7709e0c12e57b4c7796e6936..888f20a19d5671e35c3cb89fbbc0482138602942 100644
--- a/services/ui/display/platform_screen_ozone.cc
+++ b/services/ui/display/platform_screen_ozone.cc
@@ -64,6 +64,19 @@ void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate) {
display_configurator_.ForceInitialConfigure(kChromeOsBootColor);
}
+void PlatformScreenOzone::RequestCloseDisplay(int64_t display_id) {
+ if (!fake_display_controller_ || wait_for_display_config_update_)
+ return;
+
+ CachedDisplayIterator iter = GetCachedDisplayIterator(display_id);
+ if (iter != cached_displays_.end()) {
+ // Tell the NDD to remove the display. PlatformScreen will get an update
+ // that the display configuration has changed and the display will be gone.
+ wait_for_display_config_update_ =
+ fake_display_controller_->RemoveDisplay(iter->id);
+ }
+}
+
int64_t PlatformScreenOzone::GetPrimaryDisplayId() const {
return primary_display_id_;
}
« no previous file with comments | « services/ui/display/platform_screen_ozone.h ('k') | services/ui/display/platform_screen_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698