Bug 1842773 - Part 26: Update ArrayBuffer.prototype.slice for resizable buffers....
[gecko.git] / widget / ClipboardReadRequestParent.h
blobcd51c4e3006d48050be29d531dd1f88ffac286cd
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"
13 namespace mozilla {
15 class ClipboardReadRequestParent final : public PClipboardReadRequestParent {
16 using IPCResult = mozilla::ipc::IPCResult;
17 using ContentParent = mozilla::dom::ContentParent;
19 public:
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);
30 private:
31 ~ClipboardReadRequestParent() = default;
33 RefPtr<ContentParent> mManager;
34 nsCOMPtr<nsIAsyncGetClipboardData> mAsyncGetClipboardData;
37 } // namespace mozilla
39 #endif // mozilla_ClipboardReadRequestParent_h