[EFL][WK1] Apply std::unique_ptr<> to NavigatorContentUtilsClientEfl
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Apr 2014 05:24:42 +0000 (05:24 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Apr 2014 05:24:42 +0000 (05:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130958

Reviewed by Darin Adler.

As a step of replacing OwnPtr with std::unique_ptr, this patch replaces
OwnPtr with the std::unique_ptr for NavigatorContentUtilsClientEfl.

* WebCoreSupport/NavigatorContentUtilsClientEfl.cpp:
(WebCore::NavigatorContentUtilsClientEfl::create): Deleted.
* WebCoreSupport/NavigatorContentUtilsClientEfl.h:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

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

Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/NavigatorContentUtilsClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/NavigatorContentUtilsClientEfl.h
Source/WebKit/efl/ewk/ewk_view.cpp

index 3a1c64b..13c0e95 100644 (file)
@@ -1,3 +1,19 @@
+2014-04-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [EFL][WK1] Apply std::unique_ptr<> to NavigatorContentUtilsClientEfl
+        https://bugs.webkit.org/show_bug.cgi?id=130958
+
+        Reviewed by Darin Adler.
+
+        As a step of replacing OwnPtr with std::unique_ptr, this patch replaces
+        OwnPtr with the std::unique_ptr for NavigatorContentUtilsClientEfl.
+
+        * WebCoreSupport/NavigatorContentUtilsClientEfl.cpp:
+        (WebCore::NavigatorContentUtilsClientEfl::create): Deleted.
+        * WebCoreSupport/NavigatorContentUtilsClientEfl.h:
+        * ewk/ewk_view.cpp:
+        (_ewk_view_priv_new):
+
 2014-04-05  Ryuan Choi  <ryuan.choi@samsung.com>
 
         [EFL][WK1] Apply override and final keyword for ChromeClientEfl
index be49727..d4da2f3 100644 (file)
@@ -53,11 +53,6 @@ static void customHandlerDataDelete(Ewk_Custom_Handler_Data* data)
     delete data;
 }
 
-PassOwnPtr<NavigatorContentUtilsClientEfl> NavigatorContentUtilsClientEfl::create(Evas_Object* view)
-{
-    return adoptPtr(new NavigatorContentUtilsClientEfl(view));
-}
-
 NavigatorContentUtilsClientEfl::NavigatorContentUtilsClientEfl(Evas_Object* view)
     : m_view(view)
 {
index 635cfd0..eb48b1b 100644 (file)
@@ -36,7 +36,7 @@
 namespace WebCore {
 class NavigatorContentUtilsClientEfl : public WebCore::NavigatorContentUtilsClient {
 public:
-    static PassOwnPtr<NavigatorContentUtilsClientEfl> create(Evas_Object* view);
+    explicit NavigatorContentUtilsClientEfl(Evas_Object* view);
 
     ~NavigatorContentUtilsClientEfl() { }
     virtual void registerProtocolHandler(const String& scheme, const URL& baseURL, const URL&, const String& title);
@@ -48,8 +48,6 @@ public:
 
 private:
     Evas_Object* m_view;
-
-    NavigatorContentUtilsClientEfl(Evas_Object* view);
 };
 }
 
index 627940d..2440483 100644 (file)
@@ -260,7 +260,7 @@ struct _Ewk_View_Private_Data {
     WebCore::ColorChooserClient* colorChooserClient;
 #endif
 #if ENABLE(NAVIGATOR_CONTENT_UTILS) || ENABLE(CUSTOM_SCHEME_HANDLER)
-    OwnPtr<WebCore::NavigatorContentUtilsClientEfl> navigatorContentUtilsClient;
+    std::unique_ptr<WebCore::NavigatorContentUtilsClientEfl> navigatorContentUtilsClient;
 #endif
     struct {
         Ewk_Menu menu;
@@ -687,7 +687,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
 #endif
 
 #if ENABLE(NAVIGATOR_CONTENT_UTILS)
-    priv->navigatorContentUtilsClient = WebCore::NavigatorContentUtilsClientEfl::create(smartData->self);
+    priv->navigatorContentUtilsClient = std::make_unique<WebCore::NavigatorContentUtilsClientEfl>(smartData->self);
     WebCore::provideNavigatorContentUtilsTo(priv->page.get(), priv->navigatorContentUtilsClient.get());
 #endif