Bug 1942006 - Upstream a variety of Servo-specific code from Servo's downstream fork...
[gecko.git] / widget / ClipboardContentAnalysisParent.h
blobc01e0aa66038b5f6f270a3a8b4d3510550314e5f
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"
13 namespace mozilla {
15 class ClipboardContentAnalysisParent final
16 : public PClipboardContentAnalysisParent {
17 public:
18 NS_INLINE_DECL_REFCOUNTING(ClipboardContentAnalysisParent, override)
19 explicit ClipboardContentAnalysisParent(
20 RefPtr<dom::ThreadsafeContentParentHandle>&&
21 aThreadsafeContentParentHandle)
22 : mThreadsafeContentParentHandle(
23 std::move(aThreadsafeContentParentHandle)) {}
25 private:
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);
34 public:
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_