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

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

Issue 2804403002: Adds ability for WindowManager to create display roots (Closed)
Patch Set: cleanup Created 3 years, 8 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_window_tree_factory.h ('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 26be4b7058d9d418b5de9321ca9834bb928de035..0f9589b8176fa4dd47c6dd47b43877c19845f420 100644
--- a/services/ui/ws/window_manager_window_tree_factory.cc
+++ b/services/ui/ws/window_manager_window_tree_factory.cc
@@ -26,14 +26,21 @@ WindowManagerWindowTreeFactory::~WindowManagerWindowTreeFactory() {}
void WindowManagerWindowTreeFactory::CreateWindowTree(
mojom::WindowTreeRequest window_tree_request,
- mojom::WindowTreeClientPtr window_tree_client) {
+ mojom::WindowTreeClientPtr window_tree_client,
+ bool automatically_create_display_roots) {
+ if (window_tree_) {
+ DVLOG(1) << "CreateWindowTree() called more than once.";
+ return;
+ }
+
// CreateWindowTree() can only be called once, so there is no reason to keep
// the binding around.
if (binding_.is_bound())
binding_.Close();
SetWindowTree(GetWindowServer()->CreateTreeForWindowManager(
- user_id_, std::move(window_tree_request), std::move(window_tree_client)));
+ user_id_, std::move(window_tree_request), std::move(window_tree_client),
+ automatically_create_display_roots));
}
WindowManagerWindowTreeFactory::WindowManagerWindowTreeFactory(
@@ -42,8 +49,7 @@ WindowManagerWindowTreeFactory::WindowManagerWindowTreeFactory(
: window_manager_window_tree_factory_set_(
window_manager_window_tree_factory_set),
user_id_(user_id),
- binding_(this),
- window_tree_(nullptr) {}
+ binding_(this) {}
WindowServer* WindowManagerWindowTreeFactory::GetWindowServer() {
return window_manager_window_tree_factory_set_->window_server();
« no previous file with comments | « services/ui/ws/window_manager_window_tree_factory.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698