Apply session counter only for product tv 24/112124/3 submit/tizen_3.0/20170201.125229
authorYoungsoo Choi <kenshin.choi@samsung.com>
Thu, 26 Jan 2017 06:32:15 +0000 (15:32 +0900)
committerYoungcheol Kang <ychul.kang@samsung.com>
Wed, 1 Feb 2017 12:15:24 +0000 (21:15 +0900)
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 <kenshin.choi@samsung.com>
Signed-off-by: Youngcheol Kang <ychul.kang@samsung.com>
packaging/crosswalk-tizen.spec
runtime/browser/web_application.cc
runtime/runtime.gyp

index b1f452b26715e8e1393353be854f668e01d55abe..e908515cc9943e303e296c88ac3790a3b2114cda 100755 (executable)
@@ -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}
index 6c6688d06fa26b187b679e8ed6e7248ba14d54e4..085af1e2c948fba4b0c596da54b64958ed103c2c 100755 (executable)
@@ -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,
index a818470a16a8f86a844ceae4ac9b55cb9e3357a2..4348b5f0499eacf54806979693a1fc4568f2ab13 100755 (executable)
@@ -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'],
         }],