summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DeviceOrientationController.cpp
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/dom/DeviceOrientationController.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/dom/DeviceOrientationController.cpp')
-rw-r--r--Source/WebCore/dom/DeviceOrientationController.cpp10
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