Line data Source code
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
8 :
9 : #include "mozilla/Attributes.h"
10 : #include "mozilla/dom/HTMLMediaElement.h"
11 : #include "mozilla/dom/TypedArray.h"
12 :
13 : typedef uint16_t nsMediaNetworkState;
14 : typedef uint16_t nsMediaReadyState;
15 :
16 : namespace mozilla {
17 : namespace dom {
18 :
19 : class HTMLAudioElement final : public HTMLMediaElement
20 : {
21 : public:
22 : typedef mozilla::dom::NodeInfo NodeInfo;
23 :
24 : explicit HTMLAudioElement(already_AddRefed<NodeInfo>& aNodeInfo);
25 :
26 : // Element
27 : virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override;
28 :
29 : // nsIDOMHTMLMediaElement
30 : using HTMLMediaElement::GetPaused;
31 :
32 : virtual nsresult Clone(NodeInfo *aNodeInfo, nsINode **aResult,
33 : bool aPreallocateChildren) const override;
34 : virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel) override;
35 :
36 0 : virtual nsIDOMNode* AsDOMNode() override { return this; }
37 :
38 : // WebIDL
39 :
40 : static already_AddRefed<HTMLAudioElement>
41 : Audio(const GlobalObject& aGlobal,
42 : const Optional<nsAString>& aSrc, ErrorResult& aRv);
43 :
44 : protected:
45 : virtual ~HTMLAudioElement();
46 :
47 : virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
48 : };
49 :
50 : } // namespace dom
51 : } // namespace mozilla
52 :
53 : #endif // mozilla_dom_HTMLAudioElement_h
|