1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "HeadlessClipboardData.h"
7 namespace mozilla::widget
{
9 void HeadlessClipboardData::SetText(const nsAString
& aText
) {
14 bool HeadlessClipboardData::HasText() const { return !mPlain
.IsVoid(); }
16 const nsAString
& HeadlessClipboardData::GetText() const { return mPlain
; }
18 void HeadlessClipboardData::SetHTML(const nsAString
& aHTML
) {
23 bool HeadlessClipboardData::HasHTML() const { return !mHTML
.IsVoid(); }
25 const nsAString
& HeadlessClipboardData::GetHTML() const { return mHTML
; }
27 int32_t HeadlessClipboardData::GetChangeCount() const { return mChangeCount
; }
29 void HeadlessClipboardData::Clear() {
30 mPlain
.SetIsVoid(true);
31 mHTML
.SetIsVoid(true);
35 } // namespace mozilla::widget