Replace deprecated API to new webkit API
authorleerang song <leerang.song@samsung.com>
Thu, 13 Dec 2012 07:12:45 +0000 (16:12 +0900)
committerGerrit Code Review <gerrit2@kim11>
Fri, 14 Dec 2012 08:36:12 +0000 (17:36 +0900)
[Issue#] N/A
[Problem] webkit API is changed
[Cause] N/A
[Solution] Replace old API to new API
[SCMRequest] N/A

Change-Id: Ifbdfc101aa758b2b0439c783a5c327c548a82d3f

src/api_new/core_module.cpp [changed mode: 0644->0755]
src/view/webkit/view_logic.cpp

old mode 100644 (file)
new mode 100755 (executable)
index f678720..9aca8c2
@@ -135,8 +135,11 @@ public:
 
                 // To fork a Webprocess as soon as possible,
                 // the following ewk_api is called explicitly.
-                ewk_context_cookies_policy_set(m_ewkContext,
-                                               EWK_COOKIE_JAR_ACCEPT_ALWAYS);
+                Ewk_Cookie_Manager *ewkCookieManager;
+                ewkCookieManager =
+                    ewk_context_cookie_manager_get(m_ewkContext);
+                ewk_cookie_manager_accept_policy_set(ewkCookieManager,
+                                               EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
                 ADD_PROFILING_POINT("WebProcess fork", "stop");
 
                 ADD_PROFILING_POINT("attach databases", "start");
index 6f48f23..81695a7 100755 (executable)
@@ -310,9 +310,9 @@ void ViewLogic::resetWidget()
                 DPL::FromUTF8String(requestedUri.c_str()),
                 m_model);
 
-        const char* currentUri = ewk_view_uri_get(m_currentEwkView);
+        const char* currentUri = ewk_view_url_get(m_currentEwkView);
         if (!currentUri && 0 == strlen(currentUri)) {
-            LogError("Fail to get uri from ewk_view_uri_get");
+            LogError("Fail to get uri from ewk_view_url_get");
             return;
         }
 
@@ -638,10 +638,10 @@ void ViewLogic::ewkClientInit(Evas_Object *wkView) {
         this);
 
     // EWK Orientation Callback
-    ewk_view_orientation_lock_callback_set(
-        wkView,
-        orientationLockCallback,
-        this);
+    //ewk_view_orientation_lock_callback_set(
+    //    wkView,
+    //     orientationLockCallback,
+    //     this);
 
     // Fullscreen API callbacks
     evas_object_smart_callback_add(
@@ -824,10 +824,10 @@ void ViewLogic::ewkClientDeinit(Evas_Object *wkView) {
         fileSystemPermissionRequestCallback);
 
     // EWK Orientation Callback
-    ewk_view_orientation_lock_callback_set(
-        wkView,
-        NULL,
-        NULL);
+    //ewk_view_orientation_lock_callback_set(
+    //    wkView,
+    //    NULL,
+    //    NULL);
 
     // ime change/show/hide callback
     evas_object_smart_callback_del(
@@ -889,7 +889,11 @@ void ViewLogic::createEwkView(Evas* canvas)
     // set cookie policy
     // even arguments pass the ewkContext, this API should be called
     // after webkit Evas_Object is created
-    ewk_context_cookies_policy_set(m_ewkContext, EWK_COOKIE_JAR_ACCEPT_ALWAYS);
+    Ewk_Cookie_Manager *ewkCookieManager;
+    ewkCookieManager =
+        ewk_context_cookie_manager_get(m_ewkContext);
+    ewk_cookie_manager_accept_policy_set(ewkCookieManager,
+                           EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
 
     LogInfo("push webview: " << newEwkView);
     m_ewkViewList.push_back(newEwkView);
@@ -1108,7 +1112,7 @@ void ViewLogic::loadFinishedCallback(
     ViewLogic* This = static_cast<ViewLogic*>(data);
 
     // Fill id/password
-    const char* url = ewk_view_uri_get(This->m_currentEwkView);
+    const char* url = ewk_view_url_get(This->m_currentEwkView);
     if (NULL == url || strlen(url) == 0) {
         LogError("url is empty");
     } else {
@@ -1289,7 +1293,7 @@ void ViewLogic::policyNavigationDecideCallback(
         ewk_policy_decision_use(policyDecision);
     } else {
         // check whether this is new empty window
-        const char* activeUrl = ewk_view_uri_get(This->m_currentEwkView);
+        const char* activeUrl = ewk_view_url_get(This->m_currentEwkView);
         if(!activeUrl || 0 == strlen(activeUrl)) {
             /*
              * The view is empty and scheme has been handled externally. When
@@ -2038,7 +2042,7 @@ void ViewLogic::windowClose()
 
         // get latest ewkView
         m_currentEwkView = m_ewkViewList.back();
-        const char* uri = ewk_view_uri_get(m_currentEwkView);
+        const char* uri = ewk_view_url_get(m_currentEwkView);
         if (NULL == uri || 0 == strlen(uri)) {
             m_currentUri.clear();
         } else {