Bug 1685822 [wpt PR 27117] - [Import Maps] Add tests for rejecting multiple import...
[gecko.git] / dom / html / HTMLAudioElement.h
blob53448cbccf578f6da9ba31c3958bfbe025ac7ad0
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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/. */
6 #ifndef mozilla_dom_HTMLAudioElement_h
7 #define mozilla_dom_HTMLAudioElement_h
9 #include "mozilla/Attributes.h"
10 #include "mozilla/dom/HTMLMediaElement.h"
11 #include "mozilla/dom/TypedArray.h"
13 typedef uint16_t nsMediaNetworkState;
14 typedef uint16_t nsMediaReadyState;
16 namespace mozilla {
17 namespace dom {
19 class HTMLAudioElement final : public HTMLMediaElement {
20 public:
21 typedef mozilla::dom::NodeInfo NodeInfo;
23 NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLAudioElement, audio)
25 explicit HTMLAudioElement(already_AddRefed<NodeInfo>&& aNodeInfo);
27 // Element
28 virtual bool IsInteractiveHTMLContent() const override;
30 // nsIDOMHTMLMediaElement
31 using HTMLMediaElement::GetPaused;
33 virtual nsresult Clone(NodeInfo*, nsINode** aResult) const override;
34 virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel) override;
36 // WebIDL
38 static already_AddRefed<HTMLAudioElement> Audio(
39 const GlobalObject& aGlobal, const Optional<nsAString>& aSrc,
40 ErrorResult& aRv);
42 protected:
43 virtual ~HTMLAudioElement();
45 virtual JSObject* WrapNode(JSContext* aCx,
46 JS::Handle<JSObject*> aGivenProto) override;
49 } // namespace dom
50 } // namespace mozilla
52 #endif // mozilla_dom_HTMLAudioElement_h