Migrate all uses of DeviceMotionController and DeviceOrientationController to std...
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 May 2014 04:23:34 +0000 (04:23 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 May 2014 04:23:34 +0000 (04:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132461

Unreviewed build fix.

No new tests.

* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* platform/ios/DeviceMotionClientIOS.h:
(WebCore::DeviceMotionClientIOS::create): Deleted.
* platform/ios/DeviceOrientationClientIOS.h:
(WebCore::DeviceOrientationClientIOS::create): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168148 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/platform/ios/DeviceMotionClientIOS.h
Source/WebCore/platform/ios/DeviceOrientationClientIOS.h

index 6323b6275945ab567be0e96633231851804cf130..4d3441612f9088e644597b0e0e7e813a44164ff6 100644 (file)
@@ -1,3 +1,20 @@
+2014-05-01  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Migrate all uses of DeviceMotionController and DeviceOrientationController to std::unique_ptr
+        https://bugs.webkit.org/show_bug.cgi?id=132461
+
+        Unreviewed build fix.
+
+        No new tests.
+
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        * dom/Document.h:
+        * platform/ios/DeviceMotionClientIOS.h:
+        (WebCore::DeviceMotionClientIOS::create): Deleted.
+        * platform/ios/DeviceOrientationClientIOS.h:
+        (WebCore::DeviceOrientationClientIOS::create): Deleted.
+
 2014-05-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr in Supplement
index 1520eb3090a0a639b73439f3bc50a0be0fe3f534..e699c08068e00211d72bd88a150e2820279c6759 100644 (file)
@@ -488,10 +488,10 @@ Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsig
     , m_lastHandledUserGestureTimestamp(0)
 #if PLATFORM(IOS)
 #if ENABLE(DEVICE_ORIENTATION)
-    , m_deviceMotionClient(DeviceMotionClientIOS::create())
-    , m_deviceMotionController(DeviceMotionController::create(m_deviceMotionClient.get()))
-    , m_deviceOrientationClient(DeviceOrientationClientIOS::create())
-    , m_deviceOrientationController(DeviceOrientationController::create(m_deviceOrientationClient.get()))
+    , m_deviceMotionClient(std::make_unique<DeviceMotionClientIOS>())
+    , m_deviceMotionController(std::make_unique<DeviceMotionController>(m_deviceMotionClient.get()))
+    , m_deviceOrientationClient(std::make_unique<DeviceOrientationClientIOS>())
+    , m_deviceOrientationController(std::make_unique<DeviceOrientationController>(m_deviceOrientationClient.get()))
 #endif
 #endif
 #if ENABLE(TELEPHONE_NUMBER_DETECTION)
index 655edfc8a923a48931bdfe3dee682eb4cbd17f04..ab0850031de8021cd67f21d7d8050583d3562ac7 100644 (file)
@@ -1613,11 +1613,10 @@ private:
 #endif
 
 #if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS)
-    // FIXME: Use std::unique_ptr instead of OwnPtr after we upstream DeviceMotionClientIOS.{h, mm}.
-    OwnPtr<DeviceMotionClient> m_deviceMotionClient;
-    OwnPtr<DeviceMotionController> m_deviceMotionController;
-    OwnPtr<DeviceOrientationClient> m_deviceOrientationClient;
-    OwnPtr<DeviceOrientationController> m_deviceOrientationController;
+    std::unique_ptr<DeviceMotionClient> m_deviceMotionClient;
+    std::unique_ptr<DeviceMotionController> m_deviceMotionController;
+    std::unique_ptr<DeviceOrientationClient> m_deviceOrientationClient;
+    std::unique_ptr<DeviceOrientationController> m_deviceOrientationController;
 #endif
 
 // FIXME: Find a better place for this functionality.
index 82ee4a9c3b39afd746ac30fa12a9849fba4016f3..7cc7b02efeb984c642cf2e5c740dfd906ca9fd35 100644 (file)
@@ -42,10 +42,6 @@ namespace WebCore {
 
 class DeviceMotionClientIOS : public DeviceMotionClient {
 public:
-    static PassOwnPtr<DeviceMotionClientIOS> create()
-    {
-        return adoptPtr(new DeviceMotionClientIOS());
-    }
     DeviceMotionClientIOS();
     virtual ~DeviceMotionClientIOS() override;
     virtual void setController(DeviceMotionController*) override;
index 6539c4cf22d206ebbfccb4b3598488536171a9d5..422f18a8eecc0e2c1a26c4f34b8ee000133cfa55 100644 (file)
@@ -42,10 +42,6 @@ namespace WebCore {
 
 class DeviceOrientationClientIOS : public DeviceOrientationClient {
 public:
-    static PassOwnPtr<DeviceOrientationClientIOS> create()
-    {
-        return adoptPtr(new DeviceOrientationClientIOS());
-    }
     DeviceOrientationClientIOS();
     virtual ~DeviceOrientationClientIOS() override;
     virtual void setController(DeviceOrientationController*) override;