2008-07-09 01:22:20 -07: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 04:12:37 -07: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 05:25:46 -07:00
|
|
|
#ifndef mozilla_dom_HTMLAudioElement_h
|
|
|
|
#define mozilla_dom_HTMLAudioElement_h
|
2010-04-01 20:03:07 -07:00
|
|
|
|
2013-05-29 13:43:41 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-03-19 05:23:54 -07:00
|
|
|
#include "mozilla/dom/HTMLMediaElement.h"
|
2013-04-12 23:59:30 -07:00
|
|
|
#include "mozilla/dom/TypedArray.h"
|
2008-07-09 01:22:20 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
typedef uint16_t nsMediaNetworkState;
|
|
|
|
typedef uint16_t nsMediaReadyState;
|
2008-07-09 01:22:20 -07:00
|
|
|
|
2013-03-19 05:25:46 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-07-12 19:20:42 -07:00
|
|
|
class HTMLAudioElement MOZ_FINAL : public HTMLMediaElement
|
2008-07-09 01:22:20 -07:00
|
|
|
{
|
|
|
|
public:
|
2014-07-12 19:20:42 -07:00
|
|
|
typedef mozilla::dom::NodeInfo NodeInfo;
|
2008-07-09 01:22:20 -07:00
|
|
|
|
2014-09-01 17:49:25 -07:00
|
|
|
explicit HTMLAudioElement(already_AddRefed<NodeInfo>& aNodeInfo);
|
2008-07-09 01:22:20 -07:00
|
|
|
|
|
|
|
// nsIDOMHTMLMediaElement
|
2013-03-19 05:25:46 -07:00
|
|
|
using HTMLMediaElement::GetPaused;
|
2008-07-09 01:22:20 -07:00
|
|
|
|
2014-07-12 19:20:42 -07:00
|
|
|
virtual nsresult Clone(NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
|
|
|
virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel) MOZ_OVERRIDE;
|
2010-07-23 02:49:57 -07:00
|
|
|
|
2013-05-29 13:43:41 -07:00
|
|
|
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
2013-03-19 05:26:39 -07:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
|
2013-08-22 22:17:08 -07:00
|
|
|
static already_AddRefed<HTMLAudioElement>
|
|
|
|
Audio(const GlobalObject& aGlobal,
|
|
|
|
const Optional<nsAString>& aSrc, ErrorResult& aRv);
|
2013-03-19 05:26:39 -07:00
|
|
|
|
|
|
|
protected:
|
2014-07-08 14:23:16 -07:00
|
|
|
virtual ~HTMLAudioElement();
|
|
|
|
|
2014-04-08 15:27:17 -07:00
|
|
|
virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
|
2008-07-09 01:22:20 -07:00
|
|
|
};
|
2010-04-01 20:03:07 -07:00
|
|
|
|
2013-03-19 05:25:46 -07:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_HTMLAudioElement_h
|