chromium/ui/base/x/selection_requestor.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/base/x/selection_requestor.h"

#include "base/memory/ref_counted_memory.h"
#include "base/ranges/algorithm.h"
#include "ui/base/x/selection_owner.h"
#include "ui/base/x/selection_utils.h"
#include "ui/base/x/x11_clipboard_helper.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/xproto.h"

namespace ui {

namespace {

const char kChromeSelection[] =;

// The amount of time to wait for a request to complete before aborting it.
const int kRequestTimeoutMs =;

// Combines |data| into a single std::vector<uint8_t>.
std::vector<uint8_t> CombineData(
    const std::vector<scoped_refptr<base::RefCountedMemory>>& data) {}

}  // namespace

SelectionRequestor::SelectionRequestor(x11::Window x_window,
                                       XClipboardHelper* helper)
    :{}

SelectionRequestor::~SelectionRequestor() = default;

bool SelectionRequestor::PerformBlockingConvertSelection(
    x11::Atom selection,
    x11::Atom target,
    std::vector<uint8_t>* out_data,
    x11::Atom* out_type) {}

void SelectionRequestor::PerformBlockingConvertSelectionWithParameter(
    x11::Atom selection,
    x11::Atom target,
    const std::vector<x11::Atom>& parameter) {}

SelectionData SelectionRequestor::RequestAndWaitForTypes(
    x11::Atom selection,
    const std::vector<x11::Atom>& types) {}

void SelectionRequestor::OnSelectionNotify(
    const x11::SelectionNotifyEvent& selection) {}

bool SelectionRequestor::CanDispatchPropertyEvent(
    const x11::PropertyNotifyEvent& prop) {}

void SelectionRequestor::OnPropertyEvent(
    const x11::PropertyNotifyEvent& event) {}

void SelectionRequestor::AbortStaleRequests() {}

void SelectionRequestor::CompleteRequest(size_t index, bool success) {}

void SelectionRequestor::ConvertSelectionForCurrentRequest() {}

void SelectionRequestor::BlockTillSelectionNotifyForRequest(Request* request) {}

SelectionRequestor::Request* SelectionRequestor::GetCurrentRequest() {}

SelectionRequestor::Request::Request(x11::Atom selection,
                                     x11::Atom target,
                                     base::TimeTicks timeout)
    :{}

SelectionRequestor::Request::~Request() = default;

}  // namespace ui