Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/MediaDeviceInfo.cpp
Line
Count
Source (jump to first uncovered line)
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#include "mozilla/dom/MediaDeviceInfo.h"
6
#include "mozilla/dom/MediaStreamBinding.h"
7
#include "mozilla/MediaManager.h"
8
#include "nsIScriptGlobalObject.h"
9
10
namespace mozilla {
11
namespace dom {
12
13
MediaDeviceInfo::MediaDeviceInfo(const nsAString& aDeviceId,
14
                                 MediaDeviceKind aKind,
15
                                 const nsAString& aLabel,
16
                                 const nsAString& aGroupId)
17
  : mKind(aKind)
18
  , mDeviceId(aDeviceId)
19
  , mLabel(aLabel)
20
0
  , mGroupId(aGroupId) {}
21
22
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(MediaDeviceInfo)
23
NS_IMPL_CYCLE_COLLECTING_ADDREF(MediaDeviceInfo)
24
NS_IMPL_CYCLE_COLLECTING_RELEASE(MediaDeviceInfo)
25
0
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MediaDeviceInfo)
26
0
  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
27
0
  NS_INTERFACE_MAP_ENTRY(nsISupports)
28
0
NS_INTERFACE_MAP_END
29
30
JSObject*
31
MediaDeviceInfo::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
32
0
{
33
0
  return MediaDeviceInfo_Binding::Wrap(aCx, this, aGivenProto);
34
0
}
35
36
nsISupports* MediaDeviceInfo::GetParentObject()
37
0
{
38
0
  return nullptr;
39
0
}
40
41
void MediaDeviceInfo::GetDeviceId(nsString& retval)
42
0
{
43
0
  retval = mDeviceId;
44
0
}
45
46
MediaDeviceKind
47
MediaDeviceInfo::Kind()
48
0
{
49
0
  return mKind;
50
0
}
51
52
void MediaDeviceInfo::GetGroupId(nsString& retval)
53
0
{
54
0
  retval = mGroupId;
55
0
}
56
57
void MediaDeviceInfo::GetLabel(nsString& retval)
58
0
{
59
0
  retval = mLabel;
60
0
}
61
62
MediaDeviceKind Kind();
63
64
} // namespace dom
65
} // namespace mozilla