chromium/ui/linux/display_server_utils.cc

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

#include "ui/linux/display_server_utils.h"

#include <string>

#include "base/command_line.h"
#include "base/environment.h"
#include "base/logging.h"
#include "ui/base/ozone_buildflags.h"
#include "ui/ozone/public/ozone_switches.h"

#if BUILDFLAG(IS_OZONE_WAYLAND)
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/nix/xdg_util.h"
#include "third_party/angle/src/gpu_info_util/SystemInfo.h"
#include "ui/base/ui_base_features.h"
#endif

namespace ui {

namespace {

#if BUILDFLAG(IS_OZONE_X11)
constexpr char kPlatformX11[] =;
#endif

#if BUILDFLAG(IS_OZONE_WAYLAND)
constexpr char kPlatformWayland[] =;

bool InspectWaylandDisplay(base::Environment& env) {}
#endif  // BUILDFLAG(IS_OZONE_WAYLAND)

// Evaluates the environment and returns the effective platform name for the
// given |ozone_platform_hint|.
// For the "auto" value, returns "wayland" if the XDG session type is "wayland",
// "x11" otherwise.
// For the "wayland" value, checks if the Wayland server is available, and
// returns "x11" if it is not. See https://crbug.com/1246928.
std::string MaybeFixPlatformName(const std::string& platform_hint) {}

void MaybeOverrideDefaultAsAuto(base::CommandLine& command_line) {}

}  // namespace

void SetOzonePlatformForLinuxIfNeeded(base::CommandLine& command_line) {}

bool HasWaylandDisplay(base::Environment& env) {}

bool HasX11Display(base::Environment& env) {}

}  // namespace ui