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/dom/DeviceOrientationController.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Source/WebCore/dom/DeviceOrientationController.cpp') 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::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 DeviceOrientationController::getLastEvent() +RefPtr 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(client)); } } // namespace WebCore -- cgit v1.2.1