summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DeviceMotionController.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/DeviceMotionController.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/dom/DeviceMotionController.cpp')
-rw-r--r--Source/WebCore/dom/DeviceMotionController.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/WebCore/dom/DeviceMotionController.cpp b/Source/WebCore/dom/DeviceMotionController.cpp
index 89eb00262..1ca7aa72f 100644
--- a/Source/WebCore/dom/DeviceMotionController.cpp
+++ b/Source/WebCore/dom/DeviceMotionController.cpp
@@ -30,6 +30,7 @@
#include "DeviceMotionClient.h"
#include "DeviceMotionData.h"
#include "DeviceMotionEvent.h"
+#include "EventNames.h"
#include "Page.h"
namespace WebCore {
@@ -41,11 +42,6 @@ DeviceMotionController::DeviceMotionController(DeviceMotionClient* client)
deviceMotionClient()->setController(this);
}
-PassOwnPtr<DeviceMotionController> DeviceMotionController::create(DeviceMotionClient* client)
-{
- return adoptPtr(new DeviceMotionController(client));
-}
-
#if PLATFORM(IOS)
// FIXME: We should look to reconcile the iOS and OpenSource differences with this class
// so that we can either remove these methods or remove the PLATFORM(IOS)-guard.
@@ -77,7 +73,7 @@ bool DeviceMotionController::hasLastData()
return deviceMotionClient()->lastMotion();
}
-PassRefPtr<Event> DeviceMotionController::getLastEvent()
+RefPtr<Event> DeviceMotionController::getLastEvent()
{
return DeviceMotionEvent::create(eventNames().devicemotionEvent, deviceMotionClient()->lastMotion());
}
@@ -101,7 +97,7 @@ bool DeviceMotionController::isActiveAt(Page* page)
void provideDeviceMotionTo(Page* page, DeviceMotionClient* client)
{
- DeviceMotionController::provideTo(page, DeviceMotionController::supplementName(), DeviceMotionController::create(client));
+ DeviceMotionController::provideTo(page, DeviceMotionController::supplementName(), std::make_unique<DeviceMotionController>(client));
}
} // namespace WebCore