2008-07-09 08:22:20 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
2012-05-21 11:12:37 +00: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 12:25:46 +00:00
|
|
|
#ifndef mozilla_dom_HTMLAudioElement_h
|
|
|
|
#define mozilla_dom_HTMLAudioElement_h
|
2010-04-02 03:03:07 +00:00
|
|
|
|
2013-05-29 20:43:41 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-03-19 12:23:54 +00:00
|
|
|
#include "mozilla/dom/HTMLMediaElement.h"
|
2013-04-13 06:59:30 +00:00
|
|
|
#include "mozilla/dom/TypedArray.h"
|
2008-07-09 08:22:20 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
typedef uint16_t nsMediaNetworkState;
|
|
|
|
typedef uint16_t nsMediaReadyState;
|
2008-07-09 08:22:20 +00:00
|
|
|
|
2013-03-19 12:25:46 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-07-13 02:20:42 +00:00
|
|
|
class HTMLAudioElement MOZ_FINAL : public HTMLMediaElement
|
2008-07-09 08:22:20 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-13 02:20:42 +00:00
|
|
|
typedef mozilla::dom::NodeInfo NodeInfo;
|
2008-07-09 08:22:20 +00:00
|
|
|
|
2014-09-02 00:49:25 +00:00
|
|
|
explicit HTMLAudioElement(already_AddRefed<NodeInfo>& aNodeInfo);
|
2008-07-09 08:22:20 +00:00
|
|
|
|
2015-01-20 20:39:28 +00:00
|
|
|
// Element
|
|
|
|
virtual bool IsInteractiveHTMLContent() const MOZ_OVERRIDE;
|
|
|
|
|
2008-07-09 08:22:20 +00:00
|
|
|
// nsIDOMHTMLMediaElement
|
2013-03-19 12:25:46 +00:00
|
|
|
using HTMLMediaElement::GetPaused;
|
2008-07-09 08:22:20 +00:00
|
|
|
|
2014-07-13 02:20:42 +00:00
|
|
|
virtual nsresult Clone(NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
|
|
|
virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel) MOZ_OVERRIDE;
|
2010-07-23 09:49:57 +00:00
|
|
|
|
2013-05-29 20:43:41 +00:00
|
|
|
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
2013-03-19 12:26:39 +00:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
|
2013-08-23 05:17:08 +00:00
|
|
|
static already_AddRefed<HTMLAudioElement>
|
|
|
|
Audio(const GlobalObject& aGlobal,
|
|
|
|
const Optional<nsAString>& aSrc, ErrorResult& aRv);
|
2013-03-19 12:26:39 +00:00
|
|
|
|
|
|
|
protected:
|
2014-07-08 21:23:16 +00:00
|
|
|
virtual ~HTMLAudioElement();
|
|
|
|
|
2014-04-08 22:27:17 +00:00
|
|
|
virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
|
2008-07-09 08:22:20 +00:00
|
|
|
};
|
2010-04-02 03:03:07 +00:00
|
|
|
|
2013-03-19 12:25:46 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_HTMLAudioElement_h
|