Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / midi / MIDIOutputMap.h
blob4941f83b623435f4a6591515c4279022a0501b68
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_MIDIOutputMap_h
8 #define mozilla_dom_MIDIOutputMap_h
10 #include "nsCOMPtr.h"
11 #include "nsWrapperCache.h"
13 class nsPIDOMWindowInner;
15 namespace mozilla::dom {
17 /**
18 * Maplike DOM object that holds a list of all MIDI output ports available for
19 * access. Almost all functions are implemented automatically by WebIDL.
22 class MIDIOutputMap final : public nsISupports, public nsWrapperCache {
23 public:
24 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
25 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MIDIOutputMap)
27 explicit MIDIOutputMap(nsPIDOMWindowInner* aParent);
29 nsPIDOMWindowInner* GetParentObject() const { return mParent; }
31 JSObject* WrapObject(JSContext* aCx,
32 JS::Handle<JSObject*> aGivenProto) override;
34 private:
35 ~MIDIOutputMap() = default;
36 nsCOMPtr<nsPIDOMWindowInner> mParent;
39 } // namespace mozilla::dom
41 #endif // mozilla_dom_MIDIOutputMap_h