From 4ed4cd084278dbd671ff8cdc492a867b4b95305b Mon Sep 17 00:00:00 2001 From: leerang song Date: Thu, 13 Dec 2012 16:12:45 +0900 Subject: [PATCH] Replace deprecated API to new webkit API [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 | 7 +++++-- src/view/webkit/view_logic.cpp | 32 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 16 deletions(-) mode change 100644 => 100755 src/api_new/core_module.cpp diff --git a/src/api_new/core_module.cpp b/src/api_new/core_module.cpp old mode 100644 new mode 100755 index f678720..9aca8c2 --- a/src/api_new/core_module.cpp +++ b/src/api_new/core_module.cpp @@ -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"); diff --git a/src/view/webkit/view_logic.cpp b/src/view/webkit/view_logic.cpp index 6f48f23..81695a7 100755 --- a/src/view/webkit/view_logic.cpp +++ b/src/view/webkit/view_logic.cpp @@ -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(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 { -- 2.7.4