chromium/third_party/blink/renderer/core/clipboard/data_object.cc

/*
 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/core/clipboard/data_object.h"

#include <utility>

#include "base/functional/overloaded.h"
#include "base/notreached.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/platform/file_path_conversion.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_drag_data.h"
#include "third_party/blink/renderer/core/clipboard/clipboard_mime_types.h"
#include "third_party/blink/renderer/core/clipboard/clipboard_utilities.h"
#include "third_party/blink/renderer/core/clipboard/dragged_isolated_file_system.h"
#include "third_party/blink/renderer/core/clipboard/paste_mode.h"
#include "third_party/blink/renderer/core/clipboard/system_clipboard.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/platform/blob/blob_data.h"
#include "third_party/blink/renderer/platform/file_metadata.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h"

namespace blink {

// static
DataObject* DataObject::CreateFromClipboard(ExecutionContext* context,
                                            SystemClipboard* system_clipboard,
                                            PasteMode paste_mode) {}

DataObject* DataObject::CreateFromClipboard(SystemClipboard* system_clipboard,
                                            PasteMode paste_mode) {}

// static
DataObject* DataObject::CreateFromString(const String& data) {}

// static
DataObject* DataObject::Create() {}

DataObject::~DataObject() = default;

uint32_t DataObject::length() const {}

DataObjectItem* DataObject::Item(uint32_t index) {}

void DataObject::DeleteItem(uint32_t index) {}

void DataObject::ClearStringItems() {}

void DataObject::ClearAll() {}

DataObjectItem* DataObject::Add(const String& data, const String& type) {}

DataObjectItem* DataObject::Add(File* file) {}

DataObjectItem* DataObject::Add(File* file, const String& file_system_id) {}

void DataObject::ClearData(const String& type) {}

Vector<String> DataObject::Types() const {}

String DataObject::GetData(const String& type) const {}

void DataObject::SetData(const String& type, const String& data) {}

void DataObject::UrlAndTitle(String& url, String* title) const {}

void DataObject::SetURLAndTitle(const String& url, const String& title) {}

void DataObject::HtmlAndBaseURL(String& html, KURL& base_url) const {}

void DataObject::SetHTMLAndBaseURL(const String& html, const KURL& base_url) {}

bool DataObject::ContainsFilenames() const {}

Vector<String> DataObject::Filenames() const {}

void DataObject::AddFilename(
    ExecutionContext* context,
    const String& filename,
    const String& display_name,
    const String& file_system_id,
    scoped_refptr<FileSystemAccessDropData> file_system_access_entry) {}

void DataObject::AddFileSharedBuffer(scoped_refptr<SharedBuffer> buffer,
                                     bool is_image_accessible,
                                     const KURL& source_url,
                                     const String& filename_extension,
                                     const AtomicString& content_disposition) {}

DataObject::DataObject() :{}

DataObjectItem* DataObject::FindStringItem(const String& type) const {}

bool DataObject::InternalAddStringItem(DataObjectItem* new_item) {}

void DataObject::InternalAddFileItem(DataObjectItem* new_item) {}

void DataObject::AddObserver(Observer* observer) {}

void DataObject::NotifyItemListChanged() const {}

void DataObject::Trace(Visitor* visitor) const {}

// static
DataObject* DataObject::Create(ExecutionContext* context,
                               const WebDragData& data) {}

DataObject* DataObject::Create(const WebDragData& data) {}

WebDragData DataObject::ToWebDragData() {}

}  // namespace blink