OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Apple Inc. All rights reserved. | 2 * Copyright 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * * Redistributions of source code must retain the above copyright | 7 * * 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 * * Redistributions in binary form must reproduce the above copyright | 9 * * 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 void removeAllListeners(DOMWindow*); | 45 void removeAllListeners(DOMWindow*); |
46 | 46 |
47 void didChangeDeviceMotion(DeviceMotionData*); | 47 void didChangeDeviceMotion(DeviceMotionData*); |
48 | 48 |
49 bool isActive() { return !m_listeners.isEmpty(); } | 49 bool isActive() { return !m_listeners.isEmpty(); } |
50 | 50 |
51 private: | 51 private: |
52 void timerFired(Timer<DeviceMotionController>*); | 52 void timerFired(Timer<DeviceMotionController>*); |
53 | 53 |
54 DeviceMotionClient* m_client; | 54 DeviceMotionClient* m_client; |
55 typedef HashCountedSet<DOMWindow*> ListenersCountedSet; | 55 typedef HashCountedSet<RefPtr<DOMWindow> > ListenersCountedSet; |
56 ListenersCountedSet m_listeners; | 56 ListenersCountedSet m_listeners; |
57 typedef HashSet<DOMWindow*> ListenersSet; | 57 typedef HashSet<RefPtr<DOMWindow> > ListenersSet; |
58 ListenersSet m_newListeners; | 58 ListenersSet m_newListeners; |
59 Timer<DeviceMotionController> m_timer; | 59 Timer<DeviceMotionController> m_timer; |
60 }; | 60 }; |
61 | 61 |
62 } // namespace WebCore | 62 } // namespace WebCore |
63 | 63 |
64 #endif // DeviceMotionController_h | 64 #endif // DeviceMotionController_h |
OLD | NEW |