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

Unified Diff: services/ui/ws/window_manager_window_tree_factory.cc

Issue 2904993003: chromeos: changes how DisplayManagerObservers are notified (Closed)
Patch Set: cleanup Created 3 years, 7 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/ws/window_manager_state.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_manager_window_tree_factory.cc
diff --git a/services/ui/ws/window_manager_window_tree_factory.cc b/services/ui/ws/window_manager_window_tree_factory.cc
index 89711f2de86f19de85353f30fde2af3c09f8d1d5..ab38d7b2c3dc0d98381647878051f62ce06818f7 100644
--- a/services/ui/ws/window_manager_window_tree_factory.cc
+++ b/services/ui/ws/window_manager_window_tree_factory.cc
@@ -5,6 +5,7 @@
#include "services/ui/ws/window_manager_window_tree_factory.h"
#include "base/bind.h"
+#include "services/ui/ws/display_creation_config.h"
#include "services/ui/ws/window_manager_window_tree_factory_set.h"
#include "services/ui/ws/window_server.h"
#include "services/ui/ws/window_server_delegate.h"
@@ -39,9 +40,13 @@ void WindowManagerWindowTreeFactory::CreateWindowTree(
if (binding_.is_bound())
binding_.Close();
- window_manager_window_tree_factory_set_->window_server()
- ->delegate()
- ->OnWillCreateTreeForWindowManager(automatically_create_display_roots);
+ // If the config is MANUAL, then all WindowManagers must connect as MANUAL.
+ if (!automatically_create_display_roots &&
+ GetWindowServer()->display_creation_config() ==
+ DisplayCreationConfig::AUTOMATIC) {
+ DVLOG(1) << "CreateWindowTree() called with manual and automatic.";
+ return;
+ }
SetWindowTree(GetWindowServer()->CreateTreeForWindowManager(
user_id_, std::move(window_tree_request), std::move(window_tree_client),
« no previous file with comments | « services/ui/ws/window_manager_state.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698