From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/page/DeviceController.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'Source/WebCore/page/DeviceController.h') 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 { + WTF_MAKE_FAST_ALLOCATED; public: explicit DeviceController(DeviceClient*); - ~DeviceController() { } + virtual ~DeviceController() { } void addDeviceEventListener(DOMWindow*); void removeDeviceEventListener(DOMWindow*); void removeAllDeviceEventListeners(DOMWindow*); - void dispatchDeviceEvent(PassRefPtr); + void dispatchDeviceEvent(Event&); bool isActive() { return !m_listeners.isEmpty(); } DeviceClient* client() { return m_client; } virtual bool hasLastData() { return false; } - virtual PassRefPtr getLastEvent() { return 0; } + virtual RefPtr getLastEvent() { return nullptr; } protected: - void fireDeviceEvent(Timer&); + void fireDeviceEvent(); HashCountedSet> m_listeners; HashCountedSet> m_lastEventListeners; DeviceClient* m_client; - Timer m_timer; + Timer m_timer; }; } // namespace WebCore - -#endif // DeviceController_h -- cgit v1.2.1