Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/presentation/PresentationSessionRequest.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "PresentationSessionRequest.h"
8
#include "nsIPresentationControlChannel.h"
9
#include "nsIPresentationDevice.h"
10
11
namespace mozilla {
12
namespace dom {
13
14
NS_IMPL_ISUPPORTS(PresentationSessionRequest, nsIPresentationSessionRequest)
15
16
PresentationSessionRequest::PresentationSessionRequest(nsIPresentationDevice* aDevice,
17
                                                       const nsAString& aUrl,
18
                                                       const nsAString& aPresentationId,
19
                                                       nsIPresentationControlChannel* aControlChannel)
20
  : mUrl(aUrl)
21
  , mPresentationId(aPresentationId)
22
  , mDevice(aDevice)
23
  , mControlChannel(aControlChannel)
24
0
{
25
0
}
26
27
PresentationSessionRequest::~PresentationSessionRequest()
28
0
{
29
0
}
30
31
// nsIPresentationSessionRequest
32
33
NS_IMETHODIMP
34
PresentationSessionRequest::GetDevice(nsIPresentationDevice** aRetVal)
35
0
{
36
0
  NS_ENSURE_ARG_POINTER(aRetVal);
37
0
38
0
  nsCOMPtr<nsIPresentationDevice> device = mDevice;
39
0
  device.forget(aRetVal);
40
0
41
0
  return NS_OK;
42
0
}
43
44
NS_IMETHODIMP
45
PresentationSessionRequest::GetUrl(nsAString& aRetVal)
46
0
{
47
0
  aRetVal = mUrl;
48
0
49
0
  return NS_OK;
50
0
}
51
52
NS_IMETHODIMP
53
PresentationSessionRequest::GetPresentationId(nsAString& aRetVal)
54
0
{
55
0
  aRetVal = mPresentationId;
56
0
57
0
  return NS_OK;
58
0
}
59
60
NS_IMETHODIMP
61
PresentationSessionRequest::GetControlChannel(nsIPresentationControlChannel** aRetVal)
62
0
{
63
0
  NS_ENSURE_ARG_POINTER(aRetVal);
64
0
65
0
  nsCOMPtr<nsIPresentationControlChannel> controlChannel = mControlChannel;
66
0
  controlChannel.forget(aRetVal);
67
0
68
0
  return NS_OK;
69
0
}
70
71
} // namespace dom
72
} // namespace mozilla