Bug 1882714 [wpt PR 44850] - Update wpt metadata, a=testonly
[gecko.git] / widget / ClipboardWriteRequestParent.h
blob6027661bdbe035649e0687ae600d7fcc081181c1
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_ClipboardWriteRequestParent_h
7 #define mozilla_ClipboardWriteRequestParent_h
9 #include "mozilla/PClipboardWriteRequestParent.h"
10 #include "nsIClipboard.h"
12 namespace mozilla {
14 namespace dom {
15 class ContentParent;
18 class ClipboardWriteRequestParent final
19 : public PClipboardWriteRequestParent,
20 public nsIAsyncClipboardRequestCallback {
21 using IPCResult = mozilla::ipc::IPCResult;
22 using ContentParent = mozilla::dom::ContentParent;
24 public:
25 NS_DECL_ISUPPORTS
26 NS_DECL_NSIASYNCCLIPBOARDREQUESTCALLBACK
28 explicit ClipboardWriteRequestParent(ContentParent* aManager);
30 nsresult Init(const int32_t& aClipboardType);
32 IPCResult RecvSetData(const IPCTransferable& aTransferable);
33 IPCResult Recv__delete__(nsresult aReason);
35 void ActorDestroy(ActorDestroyReason aReason) override final;
37 private:
38 ~ClipboardWriteRequestParent();
40 RefPtr<ContentParent> mManager;
41 nsCOMPtr<nsIAsyncSetClipboardData> mAsyncSetClipboardData;
44 } // namespace mozilla
46 #endif // mozilla_ClipboardWriteRequestParent_h