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_ClipboardReadRequestParent_h
7 #define mozilla_ClipboardReadRequestParent_h
9 #include "mozilla/dom/ContentParent.h"
10 #include "mozilla/PClipboardReadRequestParent.h"
11 #include "nsIClipboard.h"
15 class ClipboardReadRequestParent final
: public PClipboardReadRequestParent
{
16 using IPCResult
= mozilla::ipc::IPCResult
;
17 using ContentParent
= mozilla::dom::ContentParent
;
20 ClipboardReadRequestParent(ContentParent
* aManager
,
21 nsIAsyncGetClipboardData
* aAsyncGetClipboardData
)
22 : mManager(aManager
), mAsyncGetClipboardData(aAsyncGetClipboardData
) {}
24 NS_INLINE_DECL_REFCOUNTING(ClipboardReadRequestParent
, override
)
26 // PClipboardReadRequestParent
27 IPCResult
RecvGetData(const nsTArray
<nsCString
>& aFlavors
,
28 GetDataResolver
&& aResolver
);
31 ~ClipboardReadRequestParent() = default;
33 RefPtr
<ContentParent
> mManager
;
34 nsCOMPtr
<nsIAsyncGetClipboardData
> mAsyncGetClipboardData
;
37 } // namespace mozilla
39 #endif // mozilla_ClipboardReadRequestParent_h