|
| 1 | +/* |
| 2 | + * Copyright (C) 2024 Zhang Ji Peng |
| 3 | + * |
| 4 | + * This library is free software; you can redistribute it and/or |
| 5 | + * modify it under the terms of the GNU Lesser General Public |
| 6 | + * License as published by the Free Software Foundation; either |
| 7 | + * version 2 of the License, or (at your option) any later version. |
| 8 | + * |
| 9 | + * This library is distributed in the hope that it will be useful, |
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | + * Lesser General Public License for more details. |
| 13 | + * |
| 14 | + * You should have received a copy of the GNU Lesser General Public |
| 15 | + * License along with this library; if not, write to the Free |
| 16 | + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 | + * Boston, MA 02110-1301 USA |
| 18 | + */ |
| 19 | + |
| 20 | +#include "config.h" |
| 21 | +#include "Pasteboard.h" |
| 22 | +#include "NotImplemented.h" |
| 23 | + |
| 24 | +namespace WebCore { |
| 25 | + |
| 26 | +std::unique_ptr<Pasteboard> Pasteboard::createForCopyAndPaste(std::unique_ptr<PasteboardContext>&& context) |
| 27 | +{ |
| 28 | + return makeUnique<Pasteboard>(WTFMove(context)); |
| 29 | +} |
| 30 | + |
| 31 | +Pasteboard::Pasteboard(std::unique_ptr<PasteboardContext>&& context) |
| 32 | + : m_context(WTFMove(context)) |
| 33 | +{ |
| 34 | +} |
| 35 | + |
| 36 | +bool Pasteboard::hasData() |
| 37 | +{ |
| 38 | + notImplemented(); |
| 39 | + return false; |
| 40 | +} |
| 41 | + |
| 42 | +Vector<String> Pasteboard::typesSafeForBindings(const String&) |
| 43 | +{ |
| 44 | + notImplemented(); |
| 45 | + return { }; |
| 46 | +} |
| 47 | + |
| 48 | +Vector<String> Pasteboard::typesForLegacyUnsafeBindings() |
| 49 | +{ |
| 50 | + Vector<String> types; |
| 51 | + notImplemented(); |
| 52 | + return types; |
| 53 | +} |
| 54 | + |
| 55 | +String Pasteboard::readOrigin() |
| 56 | +{ |
| 57 | + notImplemented(); |
| 58 | + return { }; |
| 59 | +} |
| 60 | + |
| 61 | +String Pasteboard::readString(const String& type) |
| 62 | +{ |
| 63 | + return String(); |
| 64 | +} |
| 65 | + |
| 66 | +String Pasteboard::readStringInCustomData(const String&) |
| 67 | +{ |
| 68 | + notImplemented(); |
| 69 | + return { }; |
| 70 | +} |
| 71 | + |
| 72 | +void Pasteboard::writeString(const String& type, const String& text) |
| 73 | +{ |
| 74 | + notImplemented(); |
| 75 | +} |
| 76 | + |
| 77 | +void Pasteboard::clear() |
| 78 | +{ |
| 79 | +} |
| 80 | + |
| 81 | +void Pasteboard::clear(const String&) |
| 82 | +{ |
| 83 | +} |
| 84 | + |
| 85 | +void Pasteboard::read(PasteboardPlainText& text, PlainTextURLReadingPolicy, std::optional<size_t>) |
| 86 | +{ |
| 87 | + notImplemented(); |
| 88 | +} |
| 89 | + |
| 90 | +void Pasteboard::read(PasteboardWebContentReader&, WebContentReadingPolicy, std::optional<size_t>) |
| 91 | +{ |
| 92 | + notImplemented(); |
| 93 | +} |
| 94 | + |
| 95 | +void Pasteboard::read(PasteboardFileReader&, std::optional<size_t>) |
| 96 | +{ |
| 97 | +} |
| 98 | + |
| 99 | +void Pasteboard::write(const PasteboardURL& url) |
| 100 | +{ |
| 101 | + notImplemented(); |
| 102 | +} |
| 103 | + |
| 104 | +void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&) |
| 105 | +{ |
| 106 | + notImplemented(); |
| 107 | +} |
| 108 | + |
| 109 | +void Pasteboard::write(const PasteboardImage&) |
| 110 | +{ |
| 111 | +} |
| 112 | + |
| 113 | +void Pasteboard::write(const PasteboardBuffer&) |
| 114 | +{ |
| 115 | +} |
| 116 | + |
| 117 | +void Pasteboard::write(const PasteboardWebContent& content) |
| 118 | +{ |
| 119 | + notImplemented(); |
| 120 | +} |
| 121 | + |
| 122 | +Pasteboard::FileContentState Pasteboard::fileContentState() |
| 123 | +{ |
| 124 | + notImplemented(); |
| 125 | + return FileContentState::NoFileOrImageData; |
| 126 | +} |
| 127 | + |
| 128 | +bool Pasteboard::canSmartReplace() |
| 129 | +{ |
| 130 | + return false; |
| 131 | +} |
| 132 | + |
| 133 | +void Pasteboard::writeMarkup(const String&) |
| 134 | +{ |
| 135 | +} |
| 136 | + |
| 137 | +void Pasteboard::writePlainText(const String& text, SmartReplaceOption) |
| 138 | +{ |
| 139 | + writeString("text/plain;charset=utf-8"_s, text); |
| 140 | +} |
| 141 | + |
| 142 | +void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>&) |
| 143 | +{ |
| 144 | +} |
| 145 | + |
| 146 | +void Pasteboard::write(const Color&) |
| 147 | +{ |
| 148 | +} |
| 149 | + |
| 150 | +} // namespace WebCore |
0 commit comments