Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / midi / MIDIManagerParent.h
bloba8ff0648dabc2f8599cc0517dc13c3bd5543e1e9
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_MIDIManagerParent_h
8 #define mozilla_dom_MIDIManagerParent_h
10 #include "mozilla/dom/PMIDIManagerParent.h"
12 namespace mozilla::dom {
14 /**
15 * Actor implementation for the Parent (PBackground thread) side of MIDIManager
16 * (represented in DOM by MIDIAccess). Manages actor lifetime so that we know
17 * to shut down services when all MIDIManagers are gone.
20 class MIDIManagerParent final : public PMIDIManagerParent {
21 public:
22 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MIDIManagerParent, override)
23 MIDIManagerParent() = default;
24 mozilla::ipc::IPCResult RecvRefresh();
25 mozilla::ipc::IPCResult RecvShutdown();
26 void ActorDestroy(ActorDestroyReason aWhy) override;
28 private:
29 ~MIDIManagerParent() = default;
32 } // namespace mozilla::dom
34 #endif // mozilla_dom_MIDIManagerParent_h