/work/obj-fuzz/dom/bindings/DeviceProximityEvent.cpp
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 sts=2 et cindent: */ |
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 | | /* THIS FILE IS AUTOGENERATED FROM DeviceProximityEvent.webidl BY Codegen.py - DO NOT EDIT */ |
8 | | |
9 | | #include "DeviceProximityEvent.h" |
10 | | #include "DeviceProximityEventBinding.h" |
11 | | #include "EventBinding.h" |
12 | | #include "js/GCAPI.h" |
13 | | #include "mozilla/FloatingPoint.h" |
14 | | #include "mozilla/dom/DeviceProximityEvent.h" |
15 | | #include "mozilla/dom/Nullable.h" |
16 | | #include "mozilla/dom/PrimitiveConversions.h" |
17 | | #include "nsGlobalWindowInner.h" |
18 | | |
19 | | namespace mozilla { |
20 | | namespace dom { |
21 | | |
22 | | |
23 | | DeviceProximityEvent::DeviceProximityEvent(mozilla::dom::EventTarget* aOwner) |
24 | | : Event(aOwner, nullptr, nullptr) |
25 | 0 | { |
26 | 0 | } |
27 | | |
28 | | DeviceProximityEvent::~DeviceProximityEvent() |
29 | 0 | { |
30 | 0 | } |
31 | | |
32 | | DeviceProximityEvent* |
33 | | DeviceProximityEvent::AsDeviceProximityEvent() |
34 | 0 | { |
35 | 0 | return this; |
36 | 0 | } |
37 | | |
38 | | JSObject* |
39 | | DeviceProximityEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
40 | 0 | { |
41 | 0 | return DeviceProximityEvent_Binding::Wrap(aCx, this, aGivenProto); |
42 | 0 | } |
43 | | |
44 | | already_AddRefed<DeviceProximityEvent> |
45 | | DeviceProximityEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const DeviceProximityEventInit& aEventInitDict) |
46 | 0 | { |
47 | 0 | RefPtr<DeviceProximityEvent> e = new DeviceProximityEvent(aOwner); |
48 | 0 | bool trusted = e->Init(aOwner); |
49 | 0 | e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable); |
50 | 0 | e->mValue = aEventInitDict.mValue; |
51 | 0 | e->mMin = aEventInitDict.mMin; |
52 | 0 | e->mMax = aEventInitDict.mMax; |
53 | 0 | e->SetTrusted(trusted); |
54 | 0 | e->SetComposed(aEventInitDict.mComposed); |
55 | 0 | return e.forget(); |
56 | 0 | } |
57 | | |
58 | | already_AddRefed<DeviceProximityEvent> |
59 | | DeviceProximityEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const DeviceProximityEventInit& aEventInitDict, ErrorResult& aRv) |
60 | 0 | { |
61 | 0 | nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports()); |
62 | 0 | return Constructor(owner, aType, aEventInitDict); |
63 | 0 | } |
64 | | |
65 | | double |
66 | | DeviceProximityEvent::Value() const |
67 | 0 | { |
68 | 0 | return mValue; |
69 | 0 | } |
70 | | |
71 | | double |
72 | | DeviceProximityEvent::Min() const |
73 | 0 | { |
74 | 0 | return mMin; |
75 | 0 | } |
76 | | |
77 | | double |
78 | | DeviceProximityEvent::Max() const |
79 | 0 | { |
80 | 0 | return mMax; |
81 | 0 | } |
82 | | |
83 | | |
84 | | } // namespace dom |
85 | | } // namespace mozilla |