chromium/remoting/host/linux/active_display_monitor_x11.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/linux/active_display_monitor_x11.h"

#include <memory>

#include "base/task/bind_post_task.h"
#include "base/task/single_thread_task_runner.h"
#include "base/types/cxx23_to_underlying.h"
#include "remoting/base/logging.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "ui/base/x/x11_display_util.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/event.h"
#include "ui/gfx/x/future.h"
#include "ui/gfx/x/randr.h"
#include "ui/gfx/x/window_event_manager.h"

namespace remoting {

namespace {

// For X11, webrtc::ScreenId is implemented as a RANDR Monitor ID, which
// requires XRANDR 1.5.
constexpr std::pair<uint32_t, uint32_t> kMinRandrVersion{};

}  // namespace

// This class uses Chromium X11 utilities which create global singletons, so
// this code needs to run on the UI thread.
class ActiveDisplayMonitorX11::Core : public x11::EventObserver {};

////////////////////////////////////////////////////////////////////////////////
// ActiveDisplayMonitorX11::Core implementation.

ActiveDisplayMonitorX11::Core::Core(ActiveDisplayMonitor::Callback callback)
    :{}

ActiveDisplayMonitorX11::Core::~Core() {}

void ActiveDisplayMonitorX11::Core::Init() {}

void ActiveDisplayMonitorX11::Core::OnEvent(const x11::Event& xevent) {}

void ActiveDisplayMonitorX11::Core::GetAndSendActiveDisplay() {}

x11::Window ActiveDisplayMonitorX11::Core::GetFocusedWindow() const {}

x11::Window ActiveDisplayMonitorX11::Core::GetTopLevelWindow(
    x11::Window window) const {}

bool ActiveDisplayMonitorX11::Core::IsWindowVisible(x11::Window window) const {}

webrtc::ScreenId ActiveDisplayMonitorX11::Core::GetDisplayForWindow(
    x11::Window window) const {}

////////////////////////////////////////////////////////////////////////////////
// ActiveDisplayMonitorX11 implementation.

ActiveDisplayMonitorX11::ActiveDisplayMonitorX11(
    scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
    Callback active_display_callback)
    :{}

ActiveDisplayMonitorX11::~ActiveDisplayMonitorX11() = default;

}  // namespace remoting