[Release] livebox.web-provider-1.46
[platform/framework/web/web-provider.git] / src / Plugin / AppBoxPlugin / AppBoxRenderView.cpp
index f71d7f8..ce0fbac 100755 (executable)
@@ -23,6 +23,7 @@
 #include <Eina.h>
 #include <Evas.h>
 #include <Ecore.h>
+#include <EWebKit2.h>
 #include <ewk_view.h>
 #include <ewk_context.h>
 #include <ewk_settings.h>
@@ -70,7 +71,10 @@ AppBoxRenderView::AppBoxRenderView(
     }
 
     m_boxRenderBuffer = AppBoxObserver::Instance()->getRenderBuffer(m_instanceId);
-    m_pdFastOpen = web_provider_livebox_get_pd_fast_open(m_boxId.c_str()) ? true : false;
+
+    // use fastopen to default
+    // m_pdFastOpen = web_provider_livebox_get_pd_fast_open(m_boxId.c_str()) ? true : false;
+    m_pdFastOpen = false;
     AppBoxObserver::Instance()->registerRenderView(m_instanceId, this);
 }
 
@@ -429,6 +433,7 @@ void AppBoxRenderView::executeScriptCallback(
         Evas_Object* webview, const char* result, void* data)
 {
     LogD("enter");
+
     std::string resultStr(result ? result : "null");
     LogD("result: %s", resultStr.c_str());
 }
@@ -436,6 +441,9 @@ void AppBoxRenderView::executeScriptCallback(
 void AppBoxRenderView::startLoadCallback(Evas_Object* webview)
 {
     LogD("enter");
+    if(!webview) {
+        return;
+    }
     // execute injection for creating js objects
     std::ifstream jsFile(injectionFile);
     std::string script((std::istreambuf_iterator<char>(jsFile)),
@@ -448,6 +456,10 @@ void AppBoxRenderView::startLoadCallback(Evas_Object* webview)
 void AppBoxRenderView::finishLoadCallback(Evas_Object* webview)
 {
     LogD("enter");
+    if (!webview) {
+        return;
+    }
+
     ewk_view_visibility_set(webview, EINA_TRUE);
 
     if (!m_pdHelper) {
@@ -486,6 +498,9 @@ void AppBoxRenderView::createWindowBeforeCallback(Evas** canvas, Evas_Object* pa
 void AppBoxRenderView::createWindowAfterCallback(Evas_Object* parent, Evas_Object* child)
 {
     LogD("enter");
+    if (!parent) {
+        return;
+    }
 
     if (m_pdHelper) {
         Evas* parentCanvas = evas_object_evas_get(parent);