|
@@ -204,6 +204,8 @@ namespace Chromium {
|
|
|
errPagePath.Append("homePageErr.html");
|
|
|
else if (errType._to_integral() == ERR_PAGE_REASON::startup)
|
|
|
errPagePath.Append("startPage.html");
|
|
|
+ else if (errType._to_integral() == ERR_PAGE_REASON::redirect)
|
|
|
+ errPagePath.Append("redirect.html");
|
|
|
else
|
|
|
errPagePath.Append("entityCheck.html");
|
|
|
|
|
@@ -588,6 +590,7 @@ namespace Chromium {
|
|
|
std::string CModTools::generateCommonPage(std::string url, std::string name, int width, int height, int point_x, int point_y, int top)
|
|
|
{
|
|
|
#if defined(RVC_OS_LINUX)
|
|
|
+ std::string dstUrl = url;
|
|
|
CSimpleStringA strBasePath(true);
|
|
|
this->m_pEntity->GetFunction()->GetPath("BaseDir", strBasePath);
|
|
|
std::string strPath(strBasePath.GetData());
|
|
@@ -636,7 +639,11 @@ namespace Chromium {
|
|
|
CSimpleStringA strUOSBrowserPath(execute_oldbrowser_path.c_str());
|
|
|
strParams.Append(" --new-window --no-first-run --disable-popup-blocking --disable-notifications --disable-desktop-notifications ");
|
|
|
if (ConfigManager::getInstance().m_extension_withTerminal)
|
|
|
+ {
|
|
|
strParams.Append(" --load-extension=").Append(ConfigManager::getInstance().m_extensionPath.c_str());
|
|
|
+ auto redirctUrlRet = getErrUrl(ERR_PAGE_REASON::redirect);
|
|
|
+ dstUrl = "\"" + redirctUrlRet.second + "?url=" + url + "\"";
|
|
|
+ }
|
|
|
strParams.Append(" --allow-running-insecure-content --disable-infobars --disable-suggestions-service --disable-save-password-bubble --disable-component-update");
|
|
|
|
|
|
|
|
@@ -653,7 +660,7 @@ namespace Chromium {
|
|
|
CSimpleStringA usrDataPath(tempPath);
|
|
|
usrDataPath.Append(SPLIT_SLASH_STR).Append("UOSBrowserConfig_").Append(name.c_str());
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
- strParams.Append(" --app=").Append(url.c_str());
|
|
|
+ strParams.Append(" --app=").Append(dstUrl.c_str());
|
|
|
strUOSBrowserPath.Append(strParams);
|
|
|
return strUOSBrowserPath.GetData();
|
|
|
}
|
|
@@ -664,7 +671,11 @@ namespace Chromium {
|
|
|
CSimpleStringA strUOSBrowserPath(execute_newbrowser_path.c_str());
|
|
|
strParams.Append(" --allow-running-insecure-content --new-window");
|
|
|
if (ConfigManager::getInstance().m_extension_withTerminal)
|
|
|
+ {
|
|
|
strParams.Append(" --load-extension=").Append(ConfigManager::getInstance().m_extensionPath.c_str());
|
|
|
+ auto redirctUrlRet = getErrUrl(ERR_PAGE_REASON::redirect);
|
|
|
+ dstUrl = "\"" + redirctUrlRet.second + "?url=" + url + "\"";
|
|
|
+ }
|
|
|
CSimpleStringA tempPath;
|
|
|
this->m_pEntity->GetFunction()->GetPath("Temp", tempPath);
|
|
|
CSimpleStringA cachePath(tempPath);
|
|
@@ -677,7 +688,7 @@ namespace Chromium {
|
|
|
CSimpleStringA usrDataPath(tempPath);
|
|
|
usrDataPath.Append(SPLIT_SLASH_STR).Append("BrowserConfig_").Append(name.c_str());
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
- strParams.Append(" --app=").Append(url.c_str());
|
|
|
+ strParams.Append(" --app=").Append(dstUrl.c_str());
|
|
|
strUOSBrowserPath.Append(strParams);
|
|
|
return strUOSBrowserPath.GetData();
|
|
|
}
|
|
@@ -751,6 +762,7 @@ namespace Chromium {
|
|
|
#if defined(RVC_OS_LINUX)
|
|
|
std::string CModTools::generateBrowserCMDForEverything(const std::string& url, int pageType, bool ignoreSecurity)
|
|
|
{
|
|
|
+ std::string dstUrl = url;
|
|
|
CSimpleStringA strBasePath(true);
|
|
|
this->m_pEntity->GetFunction()->GetPath("BaseDir", strBasePath);
|
|
|
std::string strPath(strBasePath.GetData());
|
|
@@ -790,7 +802,11 @@ namespace Chromium {
|
|
|
if (!ConfigManager::getInstance().m_extension_debugOpen)
|
|
|
strParams.Append(" --kiosk");
|
|
|
if (ConfigManager::getInstance().m_extension_withTerminal)
|
|
|
+ {
|
|
|
strParams.Append(" --load-extension=").Append(ConfigManager::getInstance().m_extensionPath.c_str());
|
|
|
+ auto redirctUrlRet = getErrUrl(ERR_PAGE_REASON::redirect);
|
|
|
+ dstUrl = "\"" + redirctUrlRet.second + "?url=" + url + "\"";
|
|
|
+ }
|
|
|
if (pageType == 0 || pageType == 2 || pageType == 3) {
|
|
|
|
|
|
} else if (pageType == 1) {
|
|
@@ -835,7 +851,7 @@ namespace Chromium {
|
|
|
}
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
strParams.Append(" ");
|
|
|
- strParams.Append(url.c_str());
|
|
|
+ strParams.Append(dstUrl.c_str());
|
|
|
strUOSBrowserPath.Append(strParams);
|
|
|
|
|
|
if (pageType == 0) {
|
|
@@ -854,7 +870,11 @@ namespace Chromium {
|
|
|
if (!ConfigManager::getInstance().m_extension_debugOpen)
|
|
|
strParams.Append(" --kiosk");
|
|
|
if (ConfigManager::getInstance().m_extension_withTerminal)
|
|
|
+ {
|
|
|
strParams.Append(" --load-extension=").Append(ConfigManager::getInstance().m_extensionPath.c_str());
|
|
|
+ auto redirctUrlRet = getErrUrl(ERR_PAGE_REASON::redirect);
|
|
|
+ dstUrl = "\"" + redirctUrlRet.second + "?url=" + url + "\"";
|
|
|
+ }
|
|
|
if (pageType == 0 || pageType == 2 || pageType == 3) {
|
|
|
|
|
|
} else if (pageType == 1) {
|
|
@@ -899,7 +919,7 @@ namespace Chromium {
|
|
|
}
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
strParams.Append(" ");
|
|
|
- strParams.Append(url.c_str());
|
|
|
+ strParams.Append(dstUrl.c_str());
|
|
|
strUOSBrowserPath.Append(strParams);
|
|
|
|
|
|
if (pageType == 0) {
|