diff options
Diffstat (limited to 'Source/WebCore/dom/DeviceOrientationController.cpp')
-rw-r--r-- | Source/WebCore/dom/DeviceOrientationController.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/WebCore/dom/DeviceOrientationController.cpp b/Source/WebCore/dom/DeviceOrientationController.cpp index 5ce7c5dd2..072f71189 100644 --- a/Source/WebCore/dom/DeviceOrientationController.cpp +++ b/Source/WebCore/dom/DeviceOrientationController.cpp @@ -30,6 +30,7 @@ #include "DeviceOrientationClient.h" #include "DeviceOrientationData.h" #include "DeviceOrientationEvent.h" +#include "EventNames.h" #include "Page.h" namespace WebCore { @@ -49,11 +50,6 @@ DeviceOrientationController::DeviceOrientationController(DeviceOrientationClient #endif } -PassOwnPtr<DeviceOrientationController> DeviceOrientationController::create(DeviceOrientationClient* client) -{ - return adoptPtr(new DeviceOrientationController(client)); -} - void DeviceOrientationController::didChangeDeviceOrientation(DeviceOrientationData* orientation) { dispatchDeviceEvent(DeviceOrientationEvent::create(eventNames().deviceorientationEvent, orientation)); @@ -84,7 +80,7 @@ bool DeviceOrientationController::hasLastData() return deviceOrientationClient()->lastOrientation(); } -PassRefPtr<Event> DeviceOrientationController::getLastEvent() +RefPtr<Event> DeviceOrientationController::getLastEvent() { return DeviceOrientationEvent::create(eventNames().deviceorientationEvent, deviceOrientationClient()->lastOrientation()); } @@ -109,7 +105,7 @@ bool DeviceOrientationController::isActiveAt(Page* page) void provideDeviceOrientationTo(Page* page, DeviceOrientationClient* client) { - DeviceOrientationController::provideTo(page, DeviceOrientationController::supplementName(), DeviceOrientationController::create(client)); + DeviceOrientationController::provideTo(page, DeviceOrientationController::supplementName(), std::make_unique<DeviceOrientationController>(client)); } } // namespace WebCore |