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

Unified Diff: components/mus/ws/user_display_manager.cc

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 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 | « components/mus/ws/test_utils.cc ('k') | components/mus/ws/user_display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/user_display_manager.cc
diff --git a/components/mus/ws/user_display_manager.cc b/components/mus/ws/user_display_manager.cc
index 567045ec0e6e912675f37a97d59587feba16bf4d..aa5f656271a8ca1adf0fe6b4dbe92b62d6d86085 100644
--- a/components/mus/ws/user_display_manager.cc
+++ b/components/mus/ws/user_display_manager.cc
@@ -52,10 +52,10 @@ void UserDisplayManager::AddDisplayManagerBinding(
}
void UserDisplayManager::OnWillDestroyDisplay(Display* display) {
- if (!display->GetWindowManagerStateForUser(user_id_)
- ->got_frame_decoration_values()) {
+ const WindowManagerState* wms =
+ display->GetWindowManagerStateForUser(user_id_);
+ if (wms && !wms->got_frame_decoration_values())
return;
- }
display_manager_observers_.ForAllPtrs(
[this, &display](mojom::DisplayManagerObserver* observer) {
@@ -169,12 +169,7 @@ void UserDisplayManager::CallOnDisplayChanged(
mojom::DisplayManagerObserver* observer) {
mojo::Array<mojom::DisplayPtr> displays(1);
displays[0] = wms->ToMojomDisplay();
- display_manager_observers_.ForAllPtrs(
- [&displays](mojom::DisplayManagerObserver* observer) {
- observer->OnDisplaysChanged(displays.Clone());
- });
- if (test_observer_)
- test_observer_->OnDisplaysChanged(displays.Clone());
+ observer->OnDisplaysChanged(displays.Clone());
}
void UserDisplayManager::AddObserver(
« no previous file with comments | « components/mus/ws/test_utils.cc ('k') | components/mus/ws/user_display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698