Backed out 4 changesets (bug 1879154) for causing bustage on nsUserCharacteristics...
[gecko.git] / dom / html / HTMLAudioElement.h
blob75f7105c6fea75eb9f29b7a3d24c6ebbf591c33f
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::dom {
18 class HTMLAudioElement final : public HTMLMediaElement {
19 public:
20 typedef mozilla::dom::NodeInfo NodeInfo;
22 NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLAudioElement, audio)
24 explicit HTMLAudioElement(already_AddRefed<NodeInfo>&& aNodeInfo);
26 // Element
27 virtual bool IsInteractiveHTMLContent() const override;
29 // nsIDOMHTMLMediaElement
30 using HTMLMediaElement::GetPaused;
32 virtual nsresult Clone(NodeInfo*, nsINode** aResult) const override;
33 virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel) override;
35 // WebIDL
37 static already_AddRefed<HTMLAudioElement> Audio(
38 const GlobalObject& aGlobal, const Optional<nsAString>& aSrc,
39 ErrorResult& aRv);
41 protected:
42 virtual ~HTMLAudioElement();
44 virtual JSObject* WrapNode(JSContext* aCx,
45 JS::Handle<JSObject*> aGivenProto) override;
48 } // namespace mozilla::dom
50 #endif // mozilla_dom_HTMLAudioElement_h