Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/TimeEvent.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 mozilla_dom_TimeEvent_h_
8
#define mozilla_dom_TimeEvent_h_
9
10
#include "mozilla/dom/Event.h"
11
#include "mozilla/dom/TimeEventBinding.h"
12
13
class nsGlobalWindowInner;
14
15
namespace mozilla {
16
namespace dom {
17
18
class TimeEvent final : public Event
19
{
20
public:
21
  TimeEvent(EventTarget* aOwner,
22
            nsPresContext* aPresContext,
23
            InternalSMILTimeEvent* aEvent);
24
25
  // nsISupports interface:
26
  NS_DECL_ISUPPORTS_INHERITED
27
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TimeEvent, Event)
28
29
  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
30
0
  {
31
0
    return TimeEvent_Binding::Wrap(aCx, this, aGivenProto);
32
0
  }
33
34
  void InitTimeEvent(const nsAString& aType, nsGlobalWindowInner* aView,
35
                     int32_t aDetail);
36
37
38
  int32_t Detail() const
39
0
  {
40
0
    return mDetail;
41
0
  }
42
43
  nsPIDOMWindowOuter* GetView() const
44
0
  {
45
0
    return mView;
46
0
  }
47
48
0
  TimeEvent* AsTimeEvent() final { return this; }
49
50
private:
51
0
  ~TimeEvent() {}
52
53
  nsCOMPtr<nsPIDOMWindowOuter> mView;
54
  int32_t mDetail;
55
};
56
57
} // namespace dom
58
} // namespace mozilla
59
60
already_AddRefed<mozilla::dom::TimeEvent>
61
NS_NewDOMTimeEvent(mozilla::dom::EventTarget* aOwner,
62
                   nsPresContext* aPresContext,
63
                   mozilla::InternalSMILTimeEvent* aEvent);
64
65
#endif // mozilla_dom_TimeEvent_h_