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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c
onnected); | 56 void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool c
onnected); |
57 | 57 |
58 private: | 58 private: |
59 explicit NavigatorGamepad(LocalFrame*); | 59 explicit NavigatorGamepad(LocalFrame*); |
60 | 60 |
61 static const char* supplementName(); | 61 static const char* supplementName(); |
62 | 62 |
63 void dispatchOneEvent(); | 63 void dispatchOneEvent(); |
64 void didRemoveGamepadEventListeners(); | 64 void didRemoveGamepadEventListeners(); |
| 65 bool startUpdatingIfAttached(); |
65 | 66 |
66 // DOMWindowProperty | 67 // DOMWindowProperty |
67 virtual void willDestroyGlobalObjectInFrame() override; | 68 virtual void willDestroyGlobalObjectInFrame() override; |
68 virtual void willDetachGlobalObjectFromFrame() override; | 69 virtual void willDetachGlobalObjectFromFrame() override; |
69 | 70 |
70 // PlatformEventController | 71 // PlatformEventController |
71 virtual void registerWithDispatcher() override; | 72 virtual void registerWithDispatcher() override; |
72 virtual void unregisterWithDispatcher() override; | 73 virtual void unregisterWithDispatcher() override; |
73 virtual bool hasLastData() override; | 74 virtual bool hasLastData() override; |
74 virtual void didUpdateData() override; | 75 virtual void didUpdateData() override; |
75 virtual void pageVisibilityChanged() override; | 76 virtual void pageVisibilityChanged() override; |
76 | 77 |
77 // DOMWindowLifecycleObserver | 78 // DOMWindowLifecycleObserver |
78 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr
ide; | 79 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr
ide; |
79 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov
erride; | 80 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov
erride; |
80 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; | 81 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; |
81 | 82 |
82 PersistentWillBeMember<GamepadList> m_gamepads; | 83 PersistentWillBeMember<GamepadList> m_gamepads; |
83 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad>> m_pendingEvents; | 84 PersistentHeapDequeWillBeHeapDeque<Member<Gamepad>> m_pendingEvents; |
84 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; | 85 AsyncMethodRunner<NavigatorGamepad> m_dispatchOneEventRunner; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace blink | 88 } // namespace blink |
88 | 89 |
89 #endif // NavigatorGamepad_h | 90 #endif // NavigatorGamepad_h |
OLD | NEW |