#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <gtk/gtk.h>
#include <unistd.h>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/environment.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/i18n/icu_util.h"
#include "base/logging.h"
#include "base/message_loop/message_pump_type.h"
#include "base/nix/xdg_util.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_executor.h"
#include "remoting/base/logging.h"
#include "remoting/base/string_resources.h"
#include "remoting/host/xsession_chooser_ui.inc"
#include "third_party/icu/source/common/unicode/unistr.h"
#include "third_party/icu/source/i18n/unicode/coll.h"
#include "ui/base/glib/scoped_gobject.h"
#include "ui/base/glib/scoped_gsignal.h"
#include "ui/base/l10n/l10n_util.h"
namespace remoting {
namespace {
struct XSession { … };
class SessionDialog { … };
void SessionDialog::OnRowActivated(GtkTreeView* session_list,
GtkTreePath* path,
GtkTreeViewColumn*) { … }
void SessionDialog::OnOkClicked(GtkButton*) { … }
gboolean SessionDialog::OnClose(GtkWidget* dialog, GdkEvent*) { … }
std::optional<XSession> TryLoadSession(base::FilePath path) { … }
std::vector<XSession> CollectXSessions() { … }
void ExecXSession(base::OnceClosure quit_closure, XSession session) { … }
}
int XSessionChooserMain() { … }
}