PluginModuleSupport::init fix for multiple webkit context
authorTaejeong Lee <taejeong.lee@samsung.com>
Thu, 21 Feb 2013 11:38:50 +0000 (20:38 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Thu, 21 Feb 2013 11:46:01 +0000 (20:46 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] PluginModuleSupport::init fix for multiple webkit context
[Solution] Re-arranged invoking position of PluginModuleSupport::init()

Change-Id: I46d5b0f65cbdb2ea0e2c741240e04889d35d05c3

src/api_new/ewk_context_manager.cpp
src/api_new/runnable_widget_object.cpp
src/wrt-client/wrt-client.cpp

index f5f3740..a5fbdba 100644 (file)
@@ -32,6 +32,7 @@
 #include <dpl/wrt-dao-ro/vconf_config.h>
 #include <dpl/utils/wrt_global_settings.h>
 #include "ewk_context_manager.h"
+#include "webkit/bundles/plugin_module_support.h"
 
 static const std::string bundlePath("/usr/lib/wrt-wk2-bundles/libwrt-wk2-bundle.so");
 static const std::string caCertPath("/opt/usr/share/certs/ca-certificate.crt");
@@ -83,6 +84,8 @@ bool EwkContextManager::initialize()
         }
 
         m_isInternalContext = true;
+
+        PluginModuleSupport::init(m_ewkContext, m_appId);
     }
 
     // cache model setting
index 7aa0414..954ff9b 100644 (file)
@@ -188,9 +188,6 @@ bool RunnableWidgetObject::PrepareView(const std::string &startUrl,
     ADD_PROFILING_POINT("view_logic_init", "start");
     Ewk_Context* context = m_ewkContextManager->getEwkContext();
 
-    // plugin init
-    PluginModuleSupport::init(context, DPL::ToUTF8String(m_widgetModel->TizenId));
-
     // view init
     if(!m_view->createWebView(context, window)) {
         return false;
index d153cd7..a861378 100644 (file)
@@ -29,6 +29,7 @@
 #include <EWebKit2.h>
 #include <dpl/localization/w3c_file_localization.h>
 #include <dpl/localization/LanguageTagsProvider.h>
+#include "webkit/bundles/plugin_module_support.h"
 
 //W3C PACKAGING enviroment variable name
 #define W3C_DEBUG_ENV_VARIABLE "DEBUG_LOAD_FINISH"
@@ -736,6 +737,9 @@ int main(int argc,
             setenv("WRT_LAUNCHING_PERFORMANCE", "1", 1);
             s_ewk_context = ewk_context_new_with_injected_bundle_path(
                     BUNDLE_PATH);
+
+            // plugin init
+            PluginModuleSupport::init(s_ewk_context, tizenId);
         }
 
         // Output on stdout will be flushed after every newline character,