OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class WebKitGamepadList; | 43 class WebKitGamepadList; |
44 | 44 |
45 class NavigatorGamepad final : public NoBaseWillBeGarbageCollectedFinalized<Navi
gatorGamepad>, public WillBeHeapSupplement<Navigator>, public DOMWindowProperty,
public PlatformEventController, public DOMWindowLifecycleObserver { | 45 class NavigatorGamepad final : public NoBaseWillBeGarbageCollectedFinalized<Navi
gatorGamepad>, public WillBeHeapSupplement<Navigator>, public DOMWindowProperty,
public PlatformEventController, public DOMWindowLifecycleObserver { |
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad); | 46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorGamepad); |
47 public: | 47 public: |
48 static NavigatorGamepad* from(Document&); | 48 static NavigatorGamepad* from(Document&); |
49 static NavigatorGamepad& from(Navigator&); | 49 static NavigatorGamepad& from(Navigator&); |
50 virtual ~NavigatorGamepad(); | 50 virtual ~NavigatorGamepad(); |
51 | 51 |
52 static WebKitGamepadList* webkitGetGamepads(Navigator&); | 52 static WebKitGamepadList* webkitGetGamepads(Navigator&); |
53 static GamepadList* getGamepads(Navigator&); | 53 static HeapVector<Member<Gamepad>> getGamepads(Navigator&); |
54 | 54 |
55 WebKitGamepadList* webkitGamepads(); | 55 WebKitGamepadList* webkitGamepads(); |
56 GamepadList* gamepads(); | 56 GamepadList* gamepads(); |
57 | 57 |
58 virtual void trace(Visitor*); | 58 virtual void trace(Visitor*); |
59 | 59 |
60 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c
onnected); | 60 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c
onnected); |
61 | 61 |
62 private: | 62 private: |
63 explicit NavigatorGamepad(LocalFrame*); | 63 explicit NavigatorGamepad(LocalFrame*); |
(...skipping 21 matching lines...) Expand all Loading... |
85 | 85 |
86 PersistentWillBeMember<GamepadList> m_gamepads; | 86 PersistentWillBeMember<GamepadList> m_gamepads; |
87 PersistentWillBeMember<WebKitGamepadList> m_webkitGamepads; | 87 PersistentWillBeMember<WebKitGamepadList> m_webkitGamepads; |
88 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad> > m_pendingEvents; | 88 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad> > m_pendingEvents; |
89 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; | 89 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
93 | 93 |
94 #endif // NavigatorGamepad_h | 94 #endif // NavigatorGamepad_h |
OLD | NEW |