diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/dom/DeviceOrientationController.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
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 |