From: Youngsoo Choi Date: Thu, 26 Jan 2017 06:32:15 +0000 (+0900) Subject: Apply session counter only for product tv X-Git-Tag: submit/tizen_3.0/20170201.125229^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f570dca62b5d3dfe9f72ef598bc7951381adf2d;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Apply session counter only for product tv There hasn't been any issue on public profiles regarding session count. So, the session counter is not needed for the public profiles. Also this CL adds the codes for preventing white screen issue during the termination of web application. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2867 Change-Id: I2418669eb7000f57d56fdca27437a11e5d59d09b Signed-off-by: Youngsoo Choi Signed-off-by: Youngcheol Kang --- diff --git a/packaging/crosswalk-tizen.spec b/packaging/crosswalk-tizen.spec index b1f452b26..e908515cc 100755 --- a/packaging/crosswalk-tizen.spec +++ b/packaging/crosswalk-tizen.spec @@ -115,6 +115,9 @@ GYP_OPTIONS="$GYP_OPTIONS -Dextension_path=%{extension_path}" # Injected bundle GYP_OPTIONS="$GYP_OPTIONS -Dinjected_bundle_path=%{injected_bundle_path}" +# Tizen product tv +GYP_OPTIONS="$GYP_OPTIONS -Dtizen_product_tv=%{!?TIZEN_PRODUCT_TV:0}" + # Build ./tools/gyp/gyp $GYP_OPTIONS xwalk_tizen.gyp ninja -C out/Default %{?_smp_mflags} diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 6c6688d06..085af1e2c 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -758,6 +758,12 @@ void WebApplication::RemoveWebViewFromStack(WebView* view) { auto extension_server = XWalkExtensionServer::GetInstance(); LOGGER(DEBUG) << "Shutdown extension server"; extension_server->Shutdown(); +#if !defined(TIZEN_PRODUCT_TV) + // Hide the window object for preventing the white screen + // during termination of web application. + evas_object_hide(window_->evas_object()); + Exit(); +#endif } else if (current != view_stack_.front()) { view_stack_.front()->SetVisibility(true); window_->SetContent(view_stack_.front()->evas_object()); @@ -792,6 +798,7 @@ void WebApplication::OnClosedWebView(WebView* view) { view->ReplyToJavascriptDialog(); RemoveWebViewFromStack(view); +#if defined(TIZEN_PRODUCT_TV) LOGGER(DEBUG) << "plugin_session_count : " << XWalkExtensionRendererController::plugin_session_count; @@ -804,6 +811,7 @@ void WebApplication::OnClosedWebView(WebView* view) { CheckPluginSession, &session_counter); if (!session_counter.timer) LOGGER(ERROR) << "It's failed to create session_counter timer"; +#endif } void WebApplication::OnReceivedWrtMessage(WebView* view, diff --git a/runtime/runtime.gyp b/runtime/runtime.gyp index a818470a1..4348b5f04 100755 --- a/runtime/runtime.gyp +++ b/runtime/runtime.gyp @@ -76,6 +76,9 @@ ['profile == "tv"', { 'defines': ['PROFILE_TV'], }], + ['tizen_product_tv == "1"', { + 'defines': ['TIZEN_PRODUCT_TV'], + }], ['tizen_model_formfactor == "circle"', { 'defines': ['MODEL_FORMFACTOR_CIRCLE'], }],