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_CLIPBOARDCONTENTANALYSISCHILD_H_
7 #define MOZILLA_WIDGET_CLIPBOARDCONTENTANALYSISCHILD_H_
9 #include "mozilla/ipc/Endpoint.h"
10 #include "mozilla/PClipboardContentAnalysisChild.h"
13 class ClipboardContentAnalysisChild final
14 : public PClipboardContentAnalysisChild
{
16 NS_INLINE_DECL_REFCOUNTING(ClipboardContentAnalysisChild
, override
)
18 static ClipboardContentAnalysisChild
* GetOrCreate();
20 void ActorDestroy(ActorDestroyReason aReason
) override final
{
21 // There's only one singleton, so remove our reference to it.
26 friend PClipboardContentAnalysisChild
;
27 ClipboardContentAnalysisChild() { MOZ_ASSERT(XRE_IsContentProcess()); }
28 ~ClipboardContentAnalysisChild() = default;
29 static StaticRefPtr
<ClipboardContentAnalysisChild
> sSingleton
;
31 } // namespace mozilla
33 #endif // MOZILLA_WIDGET_CLIPBOARDCONTENTANALYSISCHILD_H_