namespace {
const char *LIBRARY_PATH_SEPARATOR = "/";
+const char *TIZEN_ROOT_FEATURES = "http://tizen.org/privilege/tizen";
}
class JSPageSession::Impl
void loadInjectedJavaScript();
void installStandardFeatures();
+ void installRootFeatures();
void installRequestedFeatures();
//returns true if success or false if failed
LogInfo("Standard widget features installed.");
}
+void JSPageSession::Impl::installRootFeatures()
+{
+ LogInfo("Installing requested widget features...");
+ WrtDB::FeatureDAOReadOnly dao(TIZEN_ROOT_FEATURES);
+ auto plugin = m_pluginsSupport->getPluginModelById(dao.GetPluginHandle());
+ installPlugin(plugin);
+ LogInfo("requested root feature installed.");
+}
+
bool JSPageSession::Impl::installPlugin(PluginModelPtr plugin)
{
Assert(plugin && "Plugin Model is NULL");
// return;
// }
//
- auto plugin = m_pluginsSupport->getPluginModelById(pluginHandle);
- if (!plugin) {
- LogError("Failed to load plugin. plugin handle: " << pluginHandle);
- return false;
- }
-
- return installPluginOnDemand(plugin,parentObject,context);
+// auto plugin = m_pluginsSupport->getPluginModelById(pluginHandle);
+// if (!plugin) {
+// LogError("Failed to load plugin. plugin handle: " << pluginHandle);
+// return false;
+// }
+ m_pluginsSupport->registerPluginModel(pluginHandle);
+ return installPluginOnDemand(
+ m_pluginsSupport->getPluginModelById(pluginHandle),
+ parentObject,
+ context);
}
bool JSPageSession::Impl::installPluginOnDemand(PluginModelPtr plugin,
// Register standard features
installStandardFeatures();
+ WidgetDAOReadOnly dao(m_widgetHandle);
+ WidgetType appType = dao.getWidgetType();
+ if (appType == WrtDB::APP_TYPE_TIZENWEBAPP) {
+ installRootFeatures();
+ }
// Register special features
installRequestedFeatures();