Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/presentation/PresentationTerminateRequest.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 "PresentationTerminateRequest.h"
8
#include "nsIPresentationControlChannel.h"
9
#include "nsIPresentationDevice.h"
10
11
namespace mozilla {
12
namespace dom {
13
14
NS_IMPL_ISUPPORTS(PresentationTerminateRequest, nsIPresentationTerminateRequest)
15
16
PresentationTerminateRequest::PresentationTerminateRequest(
17
                                 nsIPresentationDevice* aDevice,
18
                                 const nsAString& aPresentationId,
19
                                 nsIPresentationControlChannel* aControlChannel,
20
                                 bool aIsFromReceiver)
21
  : mPresentationId(aPresentationId)
22
  , mDevice(aDevice)
23
  , mControlChannel(aControlChannel)
24
  , mIsFromReceiver(aIsFromReceiver)
25
0
{
26
0
}
27
28
PresentationTerminateRequest::~PresentationTerminateRequest()
29
0
{
30
0
}
31
32
// nsIPresentationTerminateRequest
33
NS_IMETHODIMP
34
PresentationTerminateRequest::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
PresentationTerminateRequest::GetPresentationId(nsAString& aRetVal)
46
0
{
47
0
  aRetVal = mPresentationId;
48
0
49
0
  return NS_OK;
50
0
}
51
52
NS_IMETHODIMP
53
PresentationTerminateRequest::GetControlChannel(
54
                                        nsIPresentationControlChannel** aRetVal)
55
0
{
56
0
  NS_ENSURE_ARG_POINTER(aRetVal);
57
0
58
0
  nsCOMPtr<nsIPresentationControlChannel> controlChannel = mControlChannel;
59
0
  controlChannel.forget(aRetVal);
60
0
61
0
  return NS_OK;
62
0
}
63
64
NS_IMETHODIMP
65
PresentationTerminateRequest::GetIsFromReceiver(bool* aRetVal)
66
0
{
67
0
  *aRetVal = mIsFromReceiver;
68
0
69
0
  return NS_OK;
70
0
}
71
72
} // namespace dom
73
} // namespace mozilla