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

Unified Diff: services/ui/ws/window_server.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_server.h ('k') | services/ui/ws/window_server_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index 67b312547b4c89e727ca8c52d56a89c92c95000e..812240dfd1267bead665f2862d3d10c3597d7445 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -11,6 +11,7 @@
#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "services/ui/ws/display.h"
+#include "services/ui/ws/display_creation_config.h"
#include "services/ui/ws/display_manager.h"
#include "services/ui/ws/frame_generator.h"
#include "services/ui/ws/gpu_host.h"
@@ -69,7 +70,8 @@ WindowServer::WindowServer(WindowServerDelegate* delegate)
next_wm_change_id_(0),
gpu_host_(new GpuHost(this)),
window_manager_window_tree_factory_set_(this, &user_id_tracker_),
- frame_sink_manager_client_binding_(this) {
+ frame_sink_manager_client_binding_(this),
+ display_creation_config_(DisplayCreationConfig::UNKNOWN) {
user_id_tracker_.AddObserver(this);
OnUserIdAdded(user_id_tracker_.active_id());
gpu_host_->CreateFrameSinkManager(
@@ -94,6 +96,13 @@ WindowServer::~WindowServer() {
display_manager_.reset();
}
+void WindowServer::SetDisplayCreationConfig(DisplayCreationConfig config) {
+ DCHECK(tree_map_.empty());
+ DCHECK_EQ(DisplayCreationConfig::UNKNOWN, display_creation_config_);
+ display_creation_config_ = config;
+ display_manager_->OnDisplayCreationConfigSet();
+}
+
ServerWindow* WindowServer::CreateServerWindow(
const WindowId& id,
const std::map<std::string, std::vector<uint8_t>>& properties) {
@@ -150,6 +159,9 @@ WindowTree* WindowServer::CreateTreeForWindowManager(
mojom::WindowTreeRequest window_tree_request,
mojom::WindowTreeClientPtr window_tree_client,
bool automatically_create_display_roots) {
+ delegate_->OnWillCreateTreeForWindowManager(
+ automatically_create_display_roots);
+
std::unique_ptr<WindowTree> window_tree(new WindowTree(
this, user_id, nullptr, base::WrapUnique(new WindowManagerAccessPolicy)));
std::unique_ptr<WindowTreeBinding> window_tree_binding =
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_server_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698