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_CLIPBOARDCONTENTANALYSISPARENT_H_
7 #define MOZILLA_WIDGET_CLIPBOARDCONTENTANALYSISPARENT_H_
9 #include "mozilla/dom/ContentParent.h"
10 #include "mozilla/PClipboardContentAnalysisParent.h"
11 #include "nsIClipboard.h"
15 class ClipboardContentAnalysisParent final
16 : public PClipboardContentAnalysisParent
{
18 NS_INLINE_DECL_REFCOUNTING(ClipboardContentAnalysisParent
, override
)
19 explicit ClipboardContentAnalysisParent(
20 RefPtr
<dom::ThreadsafeContentParentHandle
>&&
21 aThreadsafeContentParentHandle
)
22 : mThreadsafeContentParentHandle(
23 std::move(aThreadsafeContentParentHandle
)) {}
26 ~ClipboardContentAnalysisParent() = default;
27 RefPtr
<dom::ThreadsafeContentParentHandle
> mThreadsafeContentParentHandle
;
28 ipc::IPCResult
GetSomeClipboardData(
29 nsTArray
<nsCString
>&& aTypes
,
30 const nsIClipboard::ClipboardType
& aWhichClipboard
,
31 const uint64_t& aRequestingWindowContextId
, bool aCheckAllContent
,
32 IPCTransferableDataOrError
* aTransferableDataOrError
);
35 ipc::IPCResult
RecvGetClipboard(
36 nsTArray
<nsCString
>&& aTypes
,
37 const nsIClipboard::ClipboardType
& aWhichClipboard
,
38 const uint64_t& aRequestingWindowContextId
,
39 IPCTransferableDataOrError
* aTransferableDataOrError
);
40 ipc::IPCResult
RecvGetAllClipboardDataSync(
41 nsTArray
<nsCString
>&& aTypes
,
42 const nsIClipboard::ClipboardType
& aWhichClipboard
,
43 const uint64_t& aRequestingWindowContextId
,
44 IPCTransferableDataOrError
* aTransferableDataOrError
);
46 } // namespace mozilla
48 #endif // MOZILLA_WIDGET_CLIPBOARDCONTENTANALYSISPARENT_H_