diff options
Diffstat (limited to 'WebCore/dom/DeviceOrientationController.h')
-rw-r--r-- | WebCore/dom/DeviceOrientationController.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/WebCore/dom/DeviceOrientationController.h b/WebCore/dom/DeviceOrientationController.h index 5f8f49a..376e14c 100644 --- a/WebCore/dom/DeviceOrientationController.h +++ b/WebCore/dom/DeviceOrientationController.h @@ -26,8 +26,12 @@ #ifndef DeviceOrientationController_h #define DeviceOrientationController_h +#include "DOMWindow.h" +#include <wtf/HashCountedSet.h> + namespace WebCore { +class DeviceOrientation; class DeviceOrientationClient; class Page; @@ -35,13 +39,17 @@ class DeviceOrientationController { public: DeviceOrientationController(Page*, DeviceOrientationClient*); - // FIXME: Add methods to start and stop the service. + void addListener(DOMWindow*); + void removeListener(DOMWindow*); + void removeAllListeners(DOMWindow*); - void onDeviceOrientationChange(double alpha, double beta, double gamma); + void didChangeDeviceOrientation(DeviceOrientation*); private: Page* m_page; DeviceOrientationClient* m_client; + typedef HashCountedSet<DOMWindow*> ListenersSet; + ListenersSet m_listeners; }; } // namespace WebCore |