#include "ui/base/x/x11_display_manager.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "components/device_event_log/device_event_log.h"
#include "ui/base/x/x11_display_util.h"
#include "ui/display/types/display_config.h"
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/future.h"
#include "ui/gfx/x/randr.h"
#include "ui/gfx/x/xproto.h"
#if BUILDFLAG(IS_LINUX)
#include "ui/linux/linux_ui.h"
#endif
namespace ui {
namespace {
constexpr std::pair<uint32_t, uint32_t> kMinXrandrVersion{ … };
}
XDisplayManager::XDisplayManager(Delegate* delegate)
: … { … }
XDisplayManager::~XDisplayManager() = default;
void XDisplayManager::Init() { … }
bool XDisplayManager::IsXrandrAvailable() const { … }
const display::Display& XDisplayManager::GetPrimaryDisplay() const { … }
void XDisplayManager::AddObserver(display::DisplayObserver* observer) { … }
void XDisplayManager::RemoveObserver(display::DisplayObserver* observer) { … }
void XDisplayManager::OnEvent(const x11::Event& xev) { … }
void XDisplayManager::SetDisplayList(std::vector<display::Display> displays,
size_t primary_display_index) { … }
void XDisplayManager::FetchDisplayList() { … }
void XDisplayManager::OnCurrentWorkspaceChanged(
const std::string& new_workspace) { … }
void XDisplayManager::UpdateDisplayList() { … }
void XDisplayManager::DispatchDelayedDisplayListUpdate() { … }
std::string XDisplayManager::GetCurrentWorkspace() { … }
}