Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/presentation/ipc/PresentationBuilderChild.h
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 file,
5
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_PresentationBuilderChild_h
8
#define mozilla_dom_PresentationBuilderChild_h
9
10
#include "mozilla/dom/PPresentationBuilderChild.h"
11
#include "nsIPresentationSessionTransportBuilder.h"
12
13
namespace mozilla {
14
namespace dom {
15
16
class PresentationBuilderChild final: public PPresentationBuilderChild
17
                                    , public nsIPresentationSessionTransportBuilderListener
18
{
19
public:
20
  NS_DECL_ISUPPORTS
21
  NS_DECL_NSIPRESENTATIONSESSIONTRANSPORTBUILDERLISTENER
22
23
  explicit PresentationBuilderChild(const nsString& aSessionId,
24
                                    uint8_t aRole);
25
26
  nsresult Init();
27
28
  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
29
30
  virtual mozilla::ipc::IPCResult RecvOnOffer(const nsString& aSDP) override;
31
32
  virtual mozilla::ipc::IPCResult RecvOnAnswer(const nsString& aSDP) override;
33
34
  virtual mozilla::ipc::IPCResult RecvOnIceCandidate(const nsString& aCandidate) override;
35
36
private:
37
0
  virtual ~PresentationBuilderChild() = default;
38
39
  nsString mSessionId;
40
  uint8_t mRole;
41
  bool mActorDestroyed = false;
42
  nsCOMPtr<nsIPresentationDataChannelSessionTransportBuilder> mBuilder;
43
};
44
45
} // namespace dom
46
} // namespace mozilla
47
48
#endif // mozilla_dom_PresentationBuilderChild_h