Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ScreenLuminance.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:set ts=2 sw=2 et tw=78: */
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_ScreenLuminance_h
8
#define mozilla_dom_ScreenLuminance_h
9
10
#include "nsCycleCollectionParticipant.h"
11
#include "nsISupportsImpl.h"
12
#include "nsWrapperCache.h"
13
14
class nsScreen;
15
16
namespace mozilla {
17
namespace dom {
18
19
class ScreenLuminance final : public nsWrapperCache
20
{
21
public:
22
  // Ref counting and cycle collection
23
  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(ScreenLuminance)
24
  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(ScreenLuminance)
25
26
  // WebIDL methods
27
0
  double Min() const { return mMin; }
28
0
  double Max() const { return mMax; }
29
0
  double MaxAverage() const { return mMaxAverage; }
30
  // End WebIDL methods
31
32
  ScreenLuminance(nsScreen* aScreen,
33
                  double aMin,
34
                  double aMax,
35
                  double aMaxAverage)
36
    : mScreen(aScreen)
37
    , mMin(aMin)
38
    , mMax(aMax)
39
    , mMaxAverage(aMaxAverage)
40
0
  {
41
0
  }
42
43
0
  nsScreen* GetParentObject() const { return mScreen; }
44
  JSObject* WrapObject(JSContext* aCx,
45
                       JS::Handle<JSObject*> aGivenProto) override;
46
47
private:
48
0
  virtual ~ScreenLuminance() {}
49
50
  RefPtr<nsScreen> mScreen;
51
  double mMin;
52
  double mMax;
53
  double mMaxAverage;
54
};
55
56
} // namespace dom
57
} // namespace mozilla
58
59
#endif // mozilla_dom_ScreenLuminance_h