/work/obj-fuzz/dom/bindings/GamepadButtonEvent.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 GamepadButtonEvent.webidl BY Codegen.py - DO NOT EDIT */ |
8 | | |
9 | | #include "GamepadButtonEvent.h" |
10 | | #include "GamepadButtonEventBinding.h" |
11 | | #include "GamepadEventBinding.h" |
12 | | #include "js/GCAPI.h" |
13 | | #include "mozilla/dom/GamepadButtonEvent.h" |
14 | | #include "mozilla/dom/Nullable.h" |
15 | | #include "mozilla/dom/PrimitiveConversions.h" |
16 | | |
17 | | namespace mozilla { |
18 | | namespace dom { |
19 | | |
20 | | |
21 | | GamepadButtonEvent::GamepadButtonEvent(mozilla::dom::EventTarget* aOwner) |
22 | | : GamepadEvent(aOwner) |
23 | 0 | { |
24 | 0 | } |
25 | | |
26 | | GamepadButtonEvent::~GamepadButtonEvent() |
27 | 0 | { |
28 | 0 | } |
29 | | |
30 | | GamepadButtonEvent* |
31 | | GamepadButtonEvent::AsGamepadButtonEvent() |
32 | 0 | { |
33 | 0 | return this; |
34 | 0 | } |
35 | | |
36 | | JSObject* |
37 | | GamepadButtonEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
38 | 0 | { |
39 | 0 | return GamepadButtonEvent_Binding::Wrap(aCx, this, aGivenProto); |
40 | 0 | } |
41 | | |
42 | | already_AddRefed<GamepadButtonEvent> |
43 | | GamepadButtonEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const GamepadButtonEventInit& aEventInitDict) |
44 | 0 | { |
45 | 0 | RefPtr<GamepadButtonEvent> e = new GamepadButtonEvent(aOwner); |
46 | 0 | bool trusted = e->Init(aOwner); |
47 | 0 | e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable); |
48 | 0 | e->mButton = aEventInitDict.mButton; |
49 | 0 | e->mGamepad = aEventInitDict.mGamepad; |
50 | 0 | e->SetTrusted(trusted); |
51 | 0 | e->SetComposed(aEventInitDict.mComposed); |
52 | 0 | return e.forget(); |
53 | 0 | } |
54 | | |
55 | | already_AddRefed<GamepadButtonEvent> |
56 | | GamepadButtonEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const GamepadButtonEventInit& aEventInitDict, ErrorResult& aRv) |
57 | 0 | { |
58 | 0 | nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports()); |
59 | 0 | return Constructor(owner, aType, aEventInitDict); |
60 | 0 | } |
61 | | |
62 | | uint32_t |
63 | | GamepadButtonEvent::Button() const |
64 | 0 | { |
65 | 0 | return mButton; |
66 | 0 | } |
67 | | |
68 | | |
69 | | } // namespace dom |
70 | | } // namespace mozilla |