2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2013-03-19 16:25:46 +04:00
|
|
|
#ifndef mozilla_dom_HTMLAudioElement_h
|
|
|
|
#define mozilla_dom_HTMLAudioElement_h
|
2010-04-02 07:03:07 +04:00
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-03-19 16:23:54 +04:00
|
|
|
#include "mozilla/dom/HTMLMediaElement.h"
|
2013-04-13 10:59:30 +04:00
|
|
|
#include "mozilla/dom/TypedArray.h"
|
2008-07-09 12:22:20 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
typedef uint16_t nsMediaNetworkState;
|
|
|
|
typedef uint16_t nsMediaReadyState;
|
2008-07-09 12:22:20 +04:00
|
|
|
|
2013-03-19 16:25:46 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class HTMLAudioElement final : public HTMLMediaElement
|
2008-07-09 12:22:20 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-13 06:20:42 +04:00
|
|
|
typedef mozilla::dom::NodeInfo NodeInfo;
|
2008-07-09 12:22:20 +04:00
|
|
|
|
2014-09-02 04:49:25 +04:00
|
|
|
explicit HTMLAudioElement(already_AddRefed<NodeInfo>& aNodeInfo);
|
2008-07-09 12:22:20 +04:00
|
|
|
|
2015-01-20 23:39:28 +03:00
|
|
|
// Element
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override;
|
2015-01-20 23:39:28 +03:00
|
|
|
|
2008-07-09 12:22:20 +04:00
|
|
|
// nsIDOMHTMLMediaElement
|
2013-03-19 16:25:46 +04:00
|
|
|
using HTMLMediaElement::GetPaused;
|
2008-07-09 12:22:20 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsresult Clone(NodeInfo *aNodeInfo, nsINode **aResult) const override;
|
|
|
|
virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel) override;
|
2010-07-23 13:49:57 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIDOMNode* AsDOMNode() override { return this; }
|
2013-03-19 16:26:39 +04:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
|
2013-08-23 09:17:08 +04:00
|
|
|
static already_AddRefed<HTMLAudioElement>
|
|
|
|
Audio(const GlobalObject& aGlobal,
|
|
|
|
const Optional<nsAString>& aSrc, ErrorResult& aRv);
|
2013-03-19 16:26:39 +04:00
|
|
|
|
|
|
|
protected:
|
2014-07-09 01:23:16 +04:00
|
|
|
virtual ~HTMLAudioElement();
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
2008-07-09 12:22:20 +04:00
|
|
|
};
|
2010-04-02 07:03:07 +04:00
|
|
|
|
2013-03-19 16:25:46 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_HTMLAudioElement_h
|