[M120 Migration][XWalkExtension][VD] Propagates --xwalk-extension-path to renderer 47/305647/4
authorzhaosy <shiyusy.zhao@samsung.com>
Tue, 6 Feb 2024 02:47:11 +0000 (10:47 +0800)
committerBot Blink <blinkbot@samsung.com>
Wed, 7 Feb 2024 18:41:46 +0000 (18:41 +0000)
Copy '--xwalk-extension-path' to renderer process to handle xwalk
extensions.

Reference Patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/294333/

Change-Id: I2cbda9b081a4f4a4a8688a0785911594d617da2d
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
content/browser/renderer_host/render_process_host_impl.cc
tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc

index bd2b8c5..8d834f5 100644 (file)
@@ -3571,6 +3571,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
 #endif
 #if BUILDFLAG(IS_TIZEN_TV) && !defined(BUILD_CHROME)
     switches::kTizenAppId,
+    switches::kXWalkExtensionPath,
 #endif
   };
   renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames);
index e97324b..6d61f7d 100644 (file)
@@ -135,6 +135,14 @@ void ContentRendererClientEfl::RenderThreadStarted() {
       *base::CommandLine::ForCurrentProcess();
 
 #if BUILDFLAG(IS_TIZEN_TV)
+  if (command_line.HasSwitch(switches::kXWalkExtensionPath)) {
+    wrt::XWalkExtensionRendererController::SetPrivilegeChecker(
+        base::BindRepeating([]() -> bool {
+          // TODO(dh81.song)
+          // necessary to decide whether allow webapis for external URLs
+          return true;
+        }));
+  }
   if (command_line.HasSwitch(switches::kApplicationType)) {
     std::string type =
         command_line.GetSwitchValueASCII(switches::kApplicationType);
@@ -167,17 +175,6 @@ void ContentRendererClientEfl::RenderThreadStarted() {
 
   if (!command_line.HasSwitch(switches::kSingleProcess))
     LocaleEfl::Initialize();
-
-#if BUILDFLAG(IS_TIZEN)
-  if (command_line.HasSwitch(switches::kXWalkExtensionPath)) {
-    wrt::XWalkExtensionRendererController::SetPrivilegeChecker(
-        base::BindRepeating([]() -> bool {
-          // TODO(dh81.song)
-          // necessary to decide whether allow webapis for external URLs
-          return true;
-        }));
-  }
-#endif
 }
 
 void ContentRendererClientEfl::RenderFrameCreated(content::RenderFrame* render_frame) {