From 50581def33626c3ee3a41d9e77684363972c9619 Mon Sep 17 00:00:00 2001 From: Suneel Kota Date: Tue, 16 Oct 2018 18:55:57 +0530 Subject: [PATCH] Allow Page to open window for tizen applications the page is allowed to open a window only when CanCreateWindow is true, in this case no_javascript_access indicates weather the window created should be scriptable in same process hence it is made false Change-Id: I1376ad5ac52ab1d5031177c064f490c1487cf8e1 Signed-off-by: Suneel Kota --- atom/browser/atom_browser_client.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 9b9cfd1..d1ee230 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -336,6 +336,15 @@ bool AtomBrowserClient::CanCreateWindow( if (!atom::Browser::Get()->ShouldAllowNavigation(target_url.spec())) return false; +#if defined(OS_TIZEN) + auto app_data = common::ApplicationDataManager::GetCurrentAppData(); + if (app_data && !app_data->IsElectronApp()) { + // Window can be opened from script for Tizen Apps + // hence no need to check user_gesture + *no_javascript_access = false; + return true; + } +#endif if (IsRendererSandboxed(render_process_id)) { *no_javascript_access = false; return true; -- 2.7.4