blob: 533ca1e34a1879325a2e58c0764bc46270382382 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdint.h>
#include <memory>
#include "base/macros.h"
namespace ui {
namespace ws {
class Display;
class ServerWindow;
class WindowManagerState;
class WindowServer;
namespace test {
class WindowManagerDisplayRootTestApi;
// Owns the root window of a window manager for one display. Each window manager
// has one WindowManagerDisplayRoot for each Display. The root window is
// parented to the root of a Display.
class WindowManagerDisplayRoot {
explicit WindowManagerDisplayRoot(Display* display);
ServerWindow* root() { return root_.get(); }
const ServerWindow* root() const { return root_.get(); }
Display* display() { return display_; }
const Display* display() const { return display_; }
WindowManagerState* window_manager_state() { return window_manager_state_; }
const WindowManagerState* window_manager_state() const {
return window_manager_state_;
friend class Display;
WindowServer* window_server();
Display* display_;
// Root ServerWindow of this WindowManagerDisplayRoot. |root_| has a parent,
// the root ServerWindow of the Display.
std::unique_ptr<ServerWindow> root_;
WindowManagerState* window_manager_state_ = nullptr;
} // namespace ws
} // namespace ui