Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/vr/ipc/VRGPUParent.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
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef GFX_VR_GPU_PARENT_H
8
#define GFX_VR_GPU_PARENT_H
9
10
#include "mozilla/gfx/PVRGPUParent.h"
11
12
namespace mozilla {
13
namespace gfx {
14
15
class VRGPUParent final : public PVRGPUParent {
16
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRGPUParent)
17
18
public:
19
  explicit VRGPUParent(ProcessId aChildProcessId);
20
21
  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
22
  static RefPtr<VRGPUParent> CreateForGPU(Endpoint<PVRGPUParent>&& aEndpoint);
23
24
protected:
25
0
  ~VRGPUParent() {}
26
27
  void Bind(Endpoint<PVRGPUParent>&& aEndpoint);
28
  virtual mozilla::ipc::IPCResult RecvStartVRService() override;
29
  virtual mozilla::ipc::IPCResult RecvStopVRService() override;
30
31
private:
32
  void DeferredDestroy();
33
34
  RefPtr<VRGPUParent> mSelfRef;
35
#if defined(XP_WIN) || defined(XP_MACOSX) || (defined(XP_LINUX) && !defined(MOZ_WIDGET_ANDROID))
36
  RefPtr<VRService> mVRService;
37
#endif
38
};
39
40
} // namespace gfx
41
} // namespace mozilla
42
43
#endif // GFX_VR_CONTENT_PARENT_H