chromium/ui/base/dragdrop/os_exchange_data.cc

// Copyright 2012 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/base/dragdrop/os_exchange_data.h"

#include <utility>
#include <vector>

#include "base/functional/callback.h"
#include "base/pickle.h"
#include "build/build_config.h"
#include "ui/base/clipboard/clipboard_format_type.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "ui/base/dragdrop/os_exchange_data_provider_factory.h"
#include "url/origin.h"

namespace ui {

OSExchangeData::OSExchangeData()
    :{}

OSExchangeData::OSExchangeData(std::unique_ptr<OSExchangeDataProvider> provider)
    :{}

OSExchangeData::~OSExchangeData() {}

void OSExchangeData::MarkRendererTaintedFromOrigin(const url::Origin& origin) {}

bool OSExchangeData::IsRendererTainted() const {}

std::optional<url::Origin> OSExchangeData::GetRendererTaintedOrigin() const {}

void OSExchangeData::MarkAsFromPrivileged() {}

bool OSExchangeData::IsFromPrivileged() const {}

void OSExchangeData::SetString(const std::u16string& data) {}

void OSExchangeData::SetURL(const GURL& url, const std::u16string& title) {}

void OSExchangeData::SetFilename(const base::FilePath& path) {}

void OSExchangeData::SetFilenames(
    const std::vector<FileInfo>& filenames) {}

void OSExchangeData::SetPickledData(const ClipboardFormatType& format,
                                    const base::Pickle& data) {}

std::optional<std::u16string> OSExchangeData::GetString() const {}

std::optional<OSExchangeData::UrlInfo> OSExchangeData::GetURLAndTitle(
    FilenameToURLPolicy policy) const {}

std::optional<std::vector<GURL>> OSExchangeData::GetURLs(
    FilenameToURLPolicy policy) const {}

std::optional<std::vector<FileInfo>> OSExchangeData::GetFilenames() const {}

std::optional<base::Pickle> OSExchangeData::GetPickledData(
    const ClipboardFormatType& format) const {}

bool OSExchangeData::HasString() const {}

bool OSExchangeData::HasURL(FilenameToURLPolicy policy) const {}

bool OSExchangeData::HasFile() const {}

bool OSExchangeData::HasFileContents() const {}

bool OSExchangeData::HasCustomFormat(const ClipboardFormatType& format) const {}

bool OSExchangeData::HasAnyFormat(
    int formats,
    const std::set<ClipboardFormatType>& format_types) const {}

void OSExchangeData::SetFileContents(const base::FilePath& filename,
                                     const std::string& file_contents) {}

std::optional<OSExchangeData::FileContentsInfo>
OSExchangeData::GetFileContents() const {}

#if BUILDFLAG(IS_WIN)
bool OSExchangeData::HasVirtualFilenames() const {
  return provider_->HasVirtualFilenames();
}

std::optional<std::vector<FileInfo>> OSExchangeData::GetVirtualFilenames()
    const {
  return provider_->GetVirtualFilenames();
}

void OSExchangeData::GetVirtualFilesAsTempFiles(
    base::OnceCallback<
        void(const std::vector<std::pair<base::FilePath, base::FilePath>>&)>
        callback) const {
  provider_->GetVirtualFilesAsTempFiles(std::move(callback));
}
#endif

#if defined(USE_AURA)
bool OSExchangeData::HasHtml() const {}

void OSExchangeData::SetHtml(const std::u16string& html, const GURL& base_url) {}

std::optional<OSExchangeData::HtmlInfo> OSExchangeData::GetHtml() const {}
#endif

void OSExchangeData::SetSource(
    std::unique_ptr<DataTransferEndpoint> data_source) {}

DataTransferEndpoint* OSExchangeData::GetSource() const {}

}  // namespace ui