+bool WebEngine::InitializePluginHandle()
+{
+ if ( pluginName.length() == 0 )
+ {
+ // pluginName is not initialized yet.
+ const char* name = EnvironmentVariable::GetEnvironmentVariable( DALI_ENV_WEB_ENGINE_NAME );
+ if ( name )
+ {
+ pluginName = MakePluginName( name );
+ mHandle = dlopen( pluginName.c_str(), RTLD_LAZY );
+ if ( mHandle )
+ {
+ return true;
+ }
+ }
+ pluginName = std::string( kPluginFullNameDefault );
+ }
+
+ mHandle = dlopen( pluginName.c_str(), RTLD_LAZY );
+ if ( !mHandle )
+ {
+ DALI_LOG_ERROR( "Can't load %s : %s\n", pluginName.c_str(), dlerror() );
+ return false;
+ }
+
+ return true;
+}
+