|
@@ -434,11 +434,17 @@ namespace Chromium {
|
|
|
|
|
|
//strParams.Append(" --app=\"");
|
|
|
strParams.Append(" ");
|
|
|
+
|
|
|
+ std::string additionalParam = getAdditionalUOSBrowserSettings();
|
|
|
+ if (!additionalParam.empty()) {
|
|
|
+ strParams.Append(additionalParam.c_str());
|
|
|
+ strParams.Append(" ");
|
|
|
+ }
|
|
|
+
|
|
|
strParams.Append(AdUrl.c_str());
|
|
|
//strParams.Append("\"");
|
|
|
|
|
|
strUOSBrowserPath.Append(strParams);
|
|
|
- DbgEx("cmdline : %s", strUOSBrowserPath.GetData());
|
|
|
|
|
|
LogWarn(Severity_High, Error_Unexpect, LOG_EVT_CHROMIUM_OPEN_AD_WITH_UOS, strUOSBrowserPath);
|
|
|
return strUOSBrowserPath.GetData();
|
|
@@ -467,7 +473,36 @@ namespace Chromium {
|
|
|
}
|
|
|
|
|
|
|
|
|
- std::string CModTools::generateCefclientCmd(bool isExtend, std::string mainUrl)
|
|
|
+ std::string CModTools::getAdditionalUOSBrowserSettings(int nType /*= 0*/)
|
|
|
+ {
|
|
|
+ std::string result("");
|
|
|
+ CSimpleStringA section("UOSBrowserCmd");
|
|
|
+ if (nType == 1) {
|
|
|
+ section = "UOSBrowserCmdMain";
|
|
|
+ } else if(nType == 2) {
|
|
|
+ section = "UOSBrowserCmdVice";
|
|
|
+ } else if (nType != 0) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ CSmartPointer<IConfigInfo> spConfig;
|
|
|
+ m_pEntity->GetFunction()->OpenConfig(Config_Software, spConfig);
|
|
|
+ int count(0);
|
|
|
+ spConfig->ReadConfigValueInt(section, "Count", count);
|
|
|
+ for (int i = 0; i <= count; ++i) {
|
|
|
+ CSimpleStringA key = CSimpleStringA::Format("Additional%d", i);
|
|
|
+ CSimpleStringA value(true);
|
|
|
+ spConfig->ReadConfigValue(section, key, value);
|
|
|
+ if (!value.IsNullOrEmpty()) {
|
|
|
+ if (!result.empty()) result += " ";
|
|
|
+ result += value.GetData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ std::string CModTools::generateCefclientCmd(bool isExtend, std::string mainUrl)
|
|
|
{
|
|
|
if (m_bUseUOSBrowser && !isExtend) {
|
|
|
|
|
@@ -489,12 +524,18 @@ namespace Chromium {
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
|
|
|
strParams.Append(" ");
|
|
|
+
|
|
|
+ std::string additionalParam = getAdditionalUOSBrowserSettings();
|
|
|
+ if (!additionalParam.empty()) {
|
|
|
+ strParams.Append(additionalParam.c_str());
|
|
|
+ strParams.Append(" ");
|
|
|
+ }
|
|
|
+
|
|
|
strParams.Append(mainUrl.c_str());
|
|
|
|
|
|
strUOSBrowserPath.Append(strParams);
|
|
|
|
|
|
LogWarn(Severity_High, Error_Unexpect, LOG_EVT_CHROMIUM_OPEN_MAIN_WITH_UOS, strUOSBrowserPath);
|
|
|
- DbgEx("cmdline : %s", strUOSBrowserPath.GetData());
|
|
|
|
|
|
return strUOSBrowserPath.GetData();
|
|
|
}
|