From: surya.kumar7 Date: Thu, 5 Jul 2018 10:27:37 +0000 (+0530) Subject: fixup! Implementation of Appcontrol functionalities X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11e3c04198d1320584a08bca828623175b475a70;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git fixup! Implementation of Appcontrol functionalities Somtimes RenderViews are created much before app_data's Initialize() was called Moved Initialize() to resemble crosswalk's sequence Cherry-picked from https://review.tizen.org/gerrit/#/c/183404/ Change-Id: Ib51b9f7028013bddca8cea0af010f311973539bd Signed-off-by: surya.kumar7 --- diff --git a/atom/app/ui_runtime.cc b/atom/app/ui_runtime.cc index 9bde160fb..b38b7edd1 100644 --- a/atom/app/ui_runtime.cc +++ b/atom/app/ui_runtime.cc @@ -56,6 +56,7 @@ void UiRuntime::SetParam(content::ContentMainParams *params) { bool UiRuntime::OnCreate() { auto appdata = common::ApplicationDataManager::GetCurrentAppData(); + atom::Browser::Get()->Initialize(); if(appdata->splash_screen_info()){ atom::Browser* browser_model = atom::Browser::Get(); browser_model->SetSplashScreen(); @@ -91,7 +92,6 @@ void UiRuntime::OnAppControl(app_control_h app_control) { if (browser_model->launched()) { browser_model->AppControl(std::move(appcontrol)); } else { - browser_model->Initialize(); browser_model->Launch(std::move(appcontrol)); } } diff --git a/tizen/browser/tizen_browser_parts.cc b/tizen/browser/tizen_browser_parts.cc index 231a9b317..d037cfc61 100644 --- a/tizen/browser/tizen_browser_parts.cc +++ b/tizen/browser/tizen_browser_parts.cc @@ -37,7 +37,7 @@ void TizenBrowserParts::Initialize() { resource_manager_->set_base_resource_path(app_data_->application_path()); if (app_data_->csp_info() != NULL || app_data_->csp_report_info() != NULL || - app_data_->allowed_navigation_info() != NULL) { + app_data_->allowed_navigation_info() != NULL) { security_model_version_ = 2; if (app_data_->csp_info() == NULL || app_data_->csp_info()->security_rules().empty()) { @@ -60,9 +60,10 @@ void TizenBrowserParts::GetCSP(std::string &csp_rule, std::string &csp_report_ru } void TizenBrowserParts::SetLongPollingTimeout(content::RenderViewHost* rvh) { - if (app_data_->setting_info() != NULL && - app_data_->setting_info()->long_polling()) { - boost::optional polling_val(app_data_->setting_info()->long_polling()); + auto setting = app_data_->setting_info(); + if (setting.get() != NULL && + setting->long_polling()) { + boost::optional polling_val(setting->long_polling()); unsigned long *ptr = reinterpret_cast (&polling_val.get()); rvh->Send(new WrtViewMsg_SetLongPolling(rvh->GetRoutingID(), *ptr)); }