summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/DeviceController.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/page/DeviceController.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/page/DeviceController.h')
-rw-r--r--Source/WebCore/page/DeviceController.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/WebCore/page/DeviceController.h b/Source/WebCore/page/DeviceController.h
index 6a5c242de..c10db344c 100644
--- a/Source/WebCore/page/DeviceController.h
+++ b/Source/WebCore/page/DeviceController.h
@@ -24,8 +24,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DeviceController_h
-#define DeviceController_h
+#pragma once
#include "DOMWindow.h"
#include "Event.h"
@@ -39,30 +38,29 @@ class DeviceClient;
class Page;
class DeviceController : public Supplement<Page> {
+ WTF_MAKE_FAST_ALLOCATED;
public:
explicit DeviceController(DeviceClient*);
- ~DeviceController() { }
+ virtual ~DeviceController() { }
void addDeviceEventListener(DOMWindow*);
void removeDeviceEventListener(DOMWindow*);
void removeAllDeviceEventListeners(DOMWindow*);
- void dispatchDeviceEvent(PassRefPtr<Event>);
+ void dispatchDeviceEvent(Event&);
bool isActive() { return !m_listeners.isEmpty(); }
DeviceClient* client() { return m_client; }
virtual bool hasLastData() { return false; }
- virtual PassRefPtr<Event> getLastEvent() { return 0; }
+ virtual RefPtr<Event> getLastEvent() { return nullptr; }
protected:
- void fireDeviceEvent(Timer<DeviceController>&);
+ void fireDeviceEvent();
HashCountedSet<RefPtr<DOMWindow>> m_listeners;
HashCountedSet<RefPtr<DOMWindow>> m_lastEventListeners;
DeviceClient* m_client;
- Timer<DeviceController> m_timer;
+ Timer m_timer;
};
} // namespace WebCore
-
-#endif // DeviceController_h