Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/DragEvent.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_DragEvent_h_
8
#define mozilla_dom_DragEvent_h_
9
10
#include "mozilla/dom/MouseEvent.h"
11
#include "mozilla/dom/DragEventBinding.h"
12
#include "mozilla/EventForwards.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
class DataTransfer;
18
19
class DragEvent : public MouseEvent
20
{
21
public:
22
  DragEvent(EventTarget* aOwner,
23
            nsPresContext* aPresContext,
24
            WidgetDragEvent* aEvent);
25
26
  NS_INLINE_DECL_REFCOUNTING_INHERITED(DragEvent, MouseEvent)
27
28
  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
29
0
  {
30
0
    return DragEvent_Binding::Wrap(aCx, this, aGivenProto);
31
0
  }
32
33
  DragEvent* AsDragEvent() override
34
0
  {
35
0
    return this;
36
0
  }
37
38
  DataTransfer* GetDataTransfer();
39
40
  void InitDragEvent(const nsAString& aType,
41
                     bool aCanBubble, bool aCancelable,
42
                     nsGlobalWindowInner* aView, int32_t aDetail,
43
                     int32_t aScreenX, int32_t aScreenY,
44
                     int32_t aClientX, int32_t aClientY,
45
                     bool aCtrlKey, bool aAltKey, bool aShiftKey,
46
                     bool aMetaKey, uint16_t aButton,
47
                     EventTarget* aRelatedTarget,
48
                     DataTransfer* aDataTransfer);
49
50
  static already_AddRefed<DragEvent> Constructor(const GlobalObject& aGlobal,
51
                                                 const nsAString& aType,
52
                                                 const DragEventInit& aParam,
53
                                                 ErrorResult& aRv);
54
55
protected:
56
0
  ~DragEvent() {}
57
};
58
59
} // namespace dom
60
} // namespace mozilla
61
62
already_AddRefed<mozilla::dom::DragEvent>
63
NS_NewDOMDragEvent(mozilla::dom::EventTarget* aOwner,
64
                   nsPresContext* aPresContext,
65
                   mozilla::WidgetDragEvent* aEvent);
66
67
#endif // mozilla_dom_DragEvent_h_