Bug 1839316: part 5) Guard the "fetchpriority" attribute behind a pref. r=kershaw...
[gecko.git] / widget / headless / HeadlessClipboardData.h
blobab982bc63910b6ed322ae46e73eec4d4d814a925
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 #ifndef mozilla_widget_HeadlessClipboardData_h
6 #define mozilla_widget_HeadlessClipboardData_h
8 #include "mozilla/RefPtr.h"
9 #include "nsString.h"
11 namespace mozilla {
12 namespace widget {
14 class HeadlessClipboardData final {
15 public:
16 HeadlessClipboardData() : mPlain(VoidString()) {}
17 ~HeadlessClipboardData() = default;
19 // For text/plain
20 void SetText(const nsAString& aText);
21 bool HasText() const;
22 const nsAString& GetText() const;
23 int32_t GetChangeCount() const;
25 // For other APIs
26 void Clear();
28 private:
29 nsAutoString mPlain;
30 int32_t mChangeCount = 0;
33 } // namespace widget
34 } // namespace mozilla
36 #endif // mozilla_widget_HeadlessClipboardData_h