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: */
|
2015-04-08 10:07:00 +03: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/. */
|
|
|
|
|
|
|
|
#include "mozilla/dom/AVInputPort.h"
|
|
|
|
#include "mozilla/dom/AVInputPortBinding.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
AVInputPort::AVInputPort(nsPIDOMWindowInner* aWindow)
|
2015-04-08 10:07:00 +03:00
|
|
|
: InputPort(aWindow)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
AVInputPort::~AVInputPort()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/* static */ already_AddRefed<AVInputPort>
|
2016-01-30 20:05:36 +03:00
|
|
|
AVInputPort::Create(nsPIDOMWindowInner* aWindow,
|
2015-04-08 10:07:00 +03:00
|
|
|
nsIInputPortListener* aListener,
|
|
|
|
nsIInputPortData* aData,
|
|
|
|
ErrorResult& aRv)
|
|
|
|
{
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<AVInputPort> inputport = new AVInputPort(aWindow);
|
2015-04-08 10:07:00 +03:00
|
|
|
inputport->Init(aData, aListener, aRv);
|
|
|
|
if (NS_WARN_IF(aRv.Failed())) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return inputport.forget();
|
|
|
|
}
|
|
|
|
|
|
|
|
JSObject*
|
|
|
|
AVInputPort::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|
|
|
{
|
|
|
|
return AVInputPortBinding::Wrap(aCx, this, aGivenProto);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} //namespace mozilla
|