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"
18 class ClipboardWriteRequestParent final
19 : public PClipboardWriteRequestParent
,
20 public nsIAsyncClipboardRequestCallback
{
21 using IPCResult
= mozilla::ipc::IPCResult
;
22 using ContentParent
= mozilla::dom::ContentParent
;
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
;
38 ~ClipboardWriteRequestParent();
40 RefPtr
<ContentParent
> mManager
;
41 nsCOMPtr
<nsIAsyncSetClipboardData
> mAsyncSetClipboardData
;
44 } // namespace mozilla
46 #endif // mozilla_ClipboardWriteRequestParent_h