no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / widget / headless / HeadlessClipboard.h
blob697fc78f8bc0cbf795538444c9cb29f68d624d2d
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_widget_HeadlessClipboard_h
7 #define mozilla_widget_HeadlessClipboard_h
9 #include "nsBaseClipboard.h"
10 #include "nsIClipboard.h"
11 #include "mozilla/UniquePtr.h"
12 #include "HeadlessClipboardData.h"
14 namespace mozilla {
15 namespace widget {
17 class HeadlessClipboard final : public nsBaseClipboard {
18 public:
19 HeadlessClipboard();
21 NS_DECL_ISUPPORTS_INHERITED
23 protected:
24 ~HeadlessClipboard() = default;
26 // Implement the native clipboard behavior.
27 NS_IMETHOD SetNativeClipboardData(nsITransferable* aTransferable,
28 int32_t aWhichClipboard) override;
29 NS_IMETHOD GetNativeClipboardData(nsITransferable* aTransferable,
30 int32_t aWhichClipboard) override;
31 nsresult EmptyNativeClipboardData(int32_t aWhichClipboard) override;
32 mozilla::Result<int32_t, nsresult> GetNativeClipboardSequenceNumber(
33 int32_t aWhichClipboard) override;
34 mozilla::Result<bool, nsresult> HasNativeClipboardDataMatchingFlavors(
35 const nsTArray<nsCString>& aFlavorList, int32_t aWhichClipboard) override;
37 private:
38 UniquePtr<HeadlessClipboardData>
39 mClipboards[nsIClipboard::kClipboardTypeCount];
42 } // namespace widget
43 } // namespace mozilla
45 #endif