dom/media/MediaTrack.cpp
author Sylvestre Ledru <sledru@mozilla.com>
Wed, 04 Nov 2020 17:04:01 +0000
changeset 555890 8a260892acc935e4f0911b38029e69e8178c06c3
parent 555761 8bb104cbe0cf1e1de6688a2770281e76702bb8c9
permissions -rw-r--r--
Bug 1674637 - Use nested namespaces in dom/ r=sg,andi Also add some missing namespace qualifications Done with: ./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/ ./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}') Differential Revision: https://phabricator.services.mozilla.com/D95456

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 et tw=78: */
/* 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 "MediaTrack.h"
#include "AudioTrack.h"
#include "MediaTrackList.h"
#include "VideoTrack.h"

namespace mozilla::dom {

MediaTrack::MediaTrack(nsIGlobalObject* aOwnerGlobal, const nsAString& aId,
                       const nsAString& aKind, const nsAString& aLabel,
                       const nsAString& aLanguage)
    : DOMEventTargetHelper(aOwnerGlobal),
      mId(aId),
      mKind(aKind),
      mLabel(aLabel),
      mLanguage(aLanguage) {}

MediaTrack::~MediaTrack() = default;

NS_IMPL_CYCLE_COLLECTION_INHERITED(dom::MediaTrack, DOMEventTargetHelper, mList)

NS_IMPL_ADDREF_INHERITED(dom::MediaTrack, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(dom::MediaTrack, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(dom::MediaTrack)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)

void MediaTrack::SetTrackList(MediaTrackList* aList) { mList = aList; }

}  // namespace mozilla::dom