[M126 Migration] Build libchromium-impl.so with chrome implementation 68/319568/4
authorRohit Kumar <rohit.16@partner.samsung.com>
Fri, 25 Oct 2024 13:36:46 +0000 (19:06 +0530)
committerGajendra N <gajendra.n@samsung.com>
Mon, 28 Oct 2024 08:23:28 +0000 (13:53 +0530)
This patch
a) Builds libchromium-impl.so including chrome implementation and chrome_tizen
   as chrome main executable when |--build-chrome| option is given.
b) GBS root and out directory are seperated.
c) Supports EWK and WRT with --build-chrome

References:
https://review.tizen.org/gerrit/303499
https://review.tizen.org/gerrit/306836
https://review.tizen.org/gerrit/305200
https://review.tizen.org/gerrit/307791
https://review.tizen.org/gerrit/318891
https://review.tizen.org/gerrit/319290

Change-Id: Ie7718fa71ff361932e07eddb2651fcc7a4a3a6c4
Signed-off-by: Rohit Kumar <rohit.16@partner.samsung.com>
Signed-off-by: Gajendra N <gajendra.n@samsung.com>
29 files changed:
build/config/linux/libffi/BUILD.gn
chrome/BUILD.gn
components/autofill/content/renderer/password_autofill_agent.cc
content/browser/browser_interface_binders.cc
content/browser/renderer_host/media/render_frame_audio_input_stream_factory.cc
content/browser/renderer_host/render_process_host_impl.cc
content/browser/web_contents/web_contents_view_aura.cc
content/public/renderer/content_renderer_client.cc
content/renderer/render_frame_impl.cc
device/bluetooth/BUILD.gn
electron/filenames.gni
electron/shell/browser/api/electron_api_web_contents.cc
electron/shell/browser/certificate_manager_model.cc
electron/shell/browser/certificate_manager_model.h
headless/BUILD.gn
packaging/chromium-efl.spec
printing/printing_context_linux.cc
services/device/geolocation/location_arbitrator.cc
third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.cc
tizen_src/build/BUILD.gn
tizen_src/build/common.sh
tizen_src/build/config/tizen_features.gni
tizen_src/chromium_impl/media/filters/media_capabilities.cc
tizen_src/downloadable/ewk_interface_main.cc
tizen_src/ewk/chromium-ewk.filter
tizen_src/ewk/efl_integration/BUILD.gn
tizen_src/ewk/efl_integration/renderer/pepper/pepper_shared_memory_message_filter.cc
tizen_src/ewk/efl_integration/renderer/pepper/pepper_shared_memory_message_filter.h
wrt/BUILD.gn

index 405e68ef39d1405aea02d83f9930be33ffa5630f..1fc52f88f62caf80feb305c511f0bae159af548f 100644 (file)
@@ -13,8 +13,7 @@ declare_args() {
   # on Linux, libffi must be statically linked to prevent a situation where the
   # runtime version of libffi is different from the build-time version from the
   # sysroot.
-  use_system_libffi =
-      default_toolchain == "//build/toolchain/cros:target" || build_chrome
+  use_system_libffi = default_toolchain == "//build/toolchain/cros:target"
 }
 
 if (use_system_libffi) {
index 31ffa7a0d66add37177dc12a9a7ee2ed4b2fb297..84b7a545605ec5f2fcd9b2a316211cff67d97ee8 100644 (file)
@@ -1414,6 +1414,92 @@ if (is_win) {
     group("chrome_dsym_archive") {
     }
   }
+} else if (is_tizen) {
+  executable("chrome_tizen") {
+    testonly = true
+    deps = [ "//tizen_src/ewk/efl_integration:libchromium-ewk" ]
+    sources = [
+      "app/chrome_exe_main_aura.cc",
+      "app/chrome_exe_resource.h",
+    ]
+    ldflags = [
+      "-pie",
+      "-Wl,--export-dynamic",
+    ]
+    cflags = [ "-fPIC" ]
+    configs += [ "//tizen_src/build/config/tizen:executable_config" ]
+  }
+
+  static_library("chrome_lib") {
+    sources = [ "app/chrome_exe_resource.h" ]
+    defines = []
+    public_deps = []
+    deps = [
+      "//build:chromeos_buildflags",
+      "//printing/buildflags",
+    ]
+    data = [ "$root_out_dir/resources.pak" ]
+    data_deps = []
+
+    sources += [
+      "app/chrome_dll_resource.h",
+      "app/chrome_main.cc",
+      "app/chrome_main_delegate.cc",
+      "app/chrome_main_delegate.h",
+      "app/chrome_main_linux.cc",
+      "app/chrome_main_linux.h",
+    ]
+
+    deps += [
+      # On Linux, link the dependencies (libraries) that make up actual
+      # Chromium functionality directly into the executable.
+      ":dependencies",
+
+      # For configuring PartitionAlloc
+      "//base/allocator:buildflags",
+
+      # For the sampling profiler.
+      "//chrome/common/profiler",
+
+      # Needed to use the master_preferences functions
+      "//chrome/installer/util:with_no_strings",
+      "//content/public/app",
+
+      # For headless mode.
+      "//headless:headless_shell_lib",
+    ]
+
+    public_deps = [ "//chrome/common:buildflags" ]
+
+    if (!is_fuchsia) {
+      public_deps += [
+        ":xdg_mime",  # Needs to be public for installer to consume files.
+      ]
+
+      data_deps += [ "//components/crash/core/app:chrome_crashpad_handler" ]
+    }
+
+    ldflags = []
+
+    if ((is_linux || is_chromeos_lacros) && !is_component_build &&
+        !using_sanitizer) {
+      version_script = "//build/linux/chrome.map"
+      inputs = [ version_script ]
+      ldflags += [ "-Wl,--version-script=" +
+                   rebase_path(version_script, root_build_dir) ]
+    }
+
+    # These files are used by the installer so we need a public dep.
+    public_deps += [ ":packed_resources" ]
+
+    # The step's output are needed at runtime, so we also need a data_dep.
+    data_deps += [ ":packed_resources" ]
+
+    data_deps += [
+      "//chrome/browser/resources/media/mei_preload:component",
+      "//third_party/widevine/cdm",
+    ]
+  }
 }
 
 group("dependencies") {
index 80db91bb589903c73492c3b3f78ea583193a5e1c..e40f8fad1fe032d675202ab23856a34a888460ef 100644 (file)
@@ -11,7 +11,6 @@
 #include <string>
 #include <utility>
 #include <vector>
-
 #include "base/check.h"
 #include "base/containers/contains.h"
 #include "base/feature_list.h"
@@ -2456,14 +2455,10 @@ bool PasswordAutofillAgent::SupportAutoLogin() {
   //  org.tizen.browser,  com.samsung.tv.knox-browser
   // Only org.tizen.browser app need AutoLogin behavior according to their spec.
   // The latter just wants Autofill.
-#if defined(BUILD_CHROME)
-  return false;
-#else
   const std::string tizen_app_id =
       base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
           switches::kTizenAppId);
   return tizen_app_id == "org.tizen.browser";
-#endif
 }
 #endif
 
index 62d18a52554194210e7a693cdf1261b6fa847007..f6fd26c7f61bfaccbc6b7eccb3f987b50bd7c6a1 100644 (file)
 #include "third_party/blink/public/mojom/badging/badging.mojom.h"
 #endif
 
-#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
-#include "tizen_src/chromium_impl/components/xwalk_extensions/browser/xwalk_extension_manager.h"
+#if BUILDFLAG(IS_TIZEN)
+#include "components/xwalk_extensions/browser/xwalk_extension_manager.h"
 #endif
 
 namespace blink {
@@ -1415,7 +1415,7 @@ void PopulateDedicatedWorkerBinders(DedicatedWorkerHost* host,
       host->GetAncestorRenderFrameHostId(),
       RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker,
       host));
-#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
+#if BUILDFLAG(IS_TIZEN)
   map->Add<wrt::mojom::XWalkExtensionBrowser>(base::BindRepeating(
       &wrt::XWalkExtensionManager::Bind));
 #endif
index 6af445d4b37c14db2fb3daad2b77f314fc8c938a..0e0488e6b113dc563649c859f97902cc714083ec 100644 (file)
@@ -163,7 +163,7 @@ class RenderFrameAudioInputStreamFactory::Core final
       const std::string& raw_output_device_id);
 
 #if BUILDFLAG(IS_TIZEN_TV)
-  void OnMediaStateChanged(uint32_t previous, uint32_t current);
+  void OnMediaStateChanged(uint32_t previous, uint32_t current) final;
   void NotifyMediaStateChanged(uint32_t previous, uint32_t current);
 #endif
 
index c83ac10a6cff3816a264582806269dc290bfc83f..c2944641a243d4a6e758cb616bf887be573e8fdf 100644 (file)
@@ -3606,7 +3606,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
     switches::kDiscardableMemoryLimit,
     switches::kDiscardableMemoryPurgeDelay,
 #endif
-#if BUILDFLAG(IS_TIZEN_TV) && !defined(BUILD_CHROME)
+#if BUILDFLAG(IS_TIZEN_TV)
     switches::kTizenAppId,
     switches::kXWalkExtensionPath,
 #endif
index 114bb976e64aa34b51cd4178ec753a709a44ed6c..6ed881307725e7fa2e686c996381a41518b28d9b 100644 (file)
@@ -959,7 +959,7 @@ void WebContentsViewAura::SetOrientation(int orientation) {
 #endif
 
 void WebContentsViewAura::SetInitialFocus() {
-#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV) && !defined(BUILD_CHROME)
+#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV)
   if (wrt::IsInWRT() &&
       !base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kEnableOffscreenRendering)) {
index c7b573c42a1d7e327c1c07b4f464b9d9a066bb16..a7069e15621af081935e4d78661df83e67745eaa 100644 (file)
@@ -15,7 +15,6 @@
 #include "media/base/demuxer.h"
 #include "media/base/renderer_factory.h"
 #include "third_party/blink/public/common/security/protocol_handler_security_level.h"
-#include "third_party/blink/public/platform/web_application_type.h"
 #include "third_party/blink/public/platform/web_audio_device.h"
 #include "third_party/blink/public/platform/web_prescient_networking.h"
 #include "ui/gfx/icc_profile.h"
index 20bd181677252d3718c0ef111239397241c73c18..7ec28fcb5e6363410b72fb060185d64a7acecfdc 100644 (file)
@@ -3099,7 +3099,7 @@ void RenderFrameImpl::CommitFailedNavigation(
   navigation_params->http_method = WebString::FromASCII(common_params->method);
   navigation_params->error_code = error_code;
 
-#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV) && !defined(BUILD_CHROME)
+#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV)
   if (wrt::IsInWRT())
     navigation_params->grant_load_local_resources = true;
 #endif
index cf06c5e0e668160f139bf267d6658a547f6f138e..4be49d673e1d98a3f332acea414ea269cba479de 100644 (file)
@@ -49,7 +49,7 @@ source_set("deprecated_experimental_mojo") {
     "socket.h",
   ]
 
-  if (is_chromeos || is_linux || is_tizen) {
+  if (is_chromeos || is_linux) {
     sources += [
       "bluez/metrics_recorder.cc",
       "bluez/metrics_recorder.h",
index 3d330fbb0ac7c59ee5f75b73e48ba008d82eaf49..b3f462424367d3751ad1442cc2d5aa2f86a2eb7f 100644 (file)
@@ -473,6 +473,8 @@ filenames = {
     "shell/browser/osr/osr_web_contents_view.h",
     "shell/browser/plugins/plugin_utils.cc",
     "shell/browser/plugins/plugin_utils.h",
+    "shell/browser/printing/printing_utils.cc",
+    "shell/browser/printing/printing_utils.h",
     "shell/browser/protocol_registry.cc",
     "shell/browser/protocol_registry.h",
     "shell/browser/relauncher.cc",
index 59c8d19e003d162b125e161ab296c7d6eb053b28..850da84f25d07063ef3765ba20ab0eae20868ef6 100644 (file)
@@ -972,7 +972,7 @@ void WebContents::InitWithWebContents(
   browser_context_ = browser_context;
   web_contents->SetDelegate(this);
 
-#if BUILDFLAG(ENABLE_PRINTING)
+#if BUILDFLAG(ENABLE_PRINTING) && !defined(BUILD_CHROME)
   PrintViewManagerElectron::CreateForWebContents(web_contents.get());
 #endif
 
index 170cbb1fcd4b5c2ae1d4672357384e50737978cc..c0e10d1595dc243e9f24e02c70eb8bc9351a1e6e 100644 (file)
@@ -42,6 +42,8 @@ net::NSSCertDatabase* GetNSSCertDatabase(
 
 }  // namespace
 
+namespace electron {
+
 // CertificateManagerModel is created on the UI thread. It needs a
 // NSSCertDatabase handle (and on ChromeOS it needs to get the TPM status) which
 // needs to be done on the IO thread.
@@ -160,3 +162,5 @@ void CertificateManagerModel::GetCertDBOnIOThread(CreationCallback callback) {
   if (cert_db)
     std::move(split_callback.second).Run(cert_db);
 }
+
+} // namespace electron
\ No newline at end of file
index afb0eeb23176d27e86ca57f05d53d40ab56f5782..abdaa3360c32271c9e91ab0db4d8bff0363c342f 100644 (file)
@@ -13,6 +13,8 @@
 #include "base/memory/ref_counted.h"
 #include "net/cert/nss_cert_database.h"
 
+namespace electron {
+
 // CertificateManagerModel provides the data to be displayed in the certificate
 // manager dialog, and processes changes from the view.
 class CertificateManagerModel {
@@ -106,4 +108,6 @@ class CertificateManagerModel {
   bool is_user_db_available_;
 };
 
+} // namespace electron
+
 #endif  // ELECTRON_SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_
index 3792e09b13b4dbab60a7ffc0d0c455671de4e5a2..ffb3980aafb844c3ac0c51e0481b2af8161fe7a5 100644 (file)
@@ -767,7 +767,7 @@ static_library("headless_shell_lib") {
   ]
   defines = []
 
-  if (!is_component_build) {
+  if (!is_component_build && !build_chrome) {
     sources += [
       "lib/utility/headless_content_utility_client.cc",
       "lib/utility/headless_content_utility_client.h",
index 0834691aa335c2c447c10804868a4f53e8060a2e..20e18cbcf25a3db1317a5251da293f3f9150fa74 100644 (file)
@@ -561,6 +561,7 @@ touch ./tizen_src/downloadable/ewk_api_wrapper_generator.py
 %if 0%{?__enable_ewk_interface}
  "enable_ewk_interface=true" \
 %endif
+  "ozone_auto_platforms=false" \
   "enable_wrt_js=%{macro_to_bool __enable_wrt_js}" \
 %if 0%{?__enable_wrt_js}
   "xwalk_extension_path=\"%{__xwalk_extension_path}\"" \
@@ -595,11 +596,10 @@ ninja %{_smp_mflags} -C "%{OUTPUT_FOLDER}" \
 %if 0%{?__enable_squashfs_image} && "%{?tizen_profile_name}" == "tv"
   chromium-efl-install \
 %endif
-%if %{__build_chrome} == 1
-  content_shell chrome
-%else
-  efl_webprocess chromium-ewk efl_webview_app mini_browser ubrowser
+%if 0%{?__build_chrome}
+  chrome_tizen \
 %endif
+  efl_webprocess chromium-ewk efl_webview_app mini_browser ubrowser
 
 %if 0%{?_enable_unittests}
 ninja %{_smp_mflags} -C"%{OUTPUT_FOLDER}" angle_unittests env_chromium_unittests cacheinvalidation_unittests \
@@ -716,20 +716,17 @@ install -m 0644 third_party/electron_node/src/*.h "%{buildroot}"%{_includedir}/n
 %endif
 
 %if %{__build_chrome} == 1
-  install -m 0755 "%{OUTPUT_FOLDER}"/content_shell      "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/
-  sed 's#@binary@#%{CHROMIUM_LIB_DIR}/bin/content_shell#' %{SOURCE1} > "%{buildroot}"%{_bindir}/content_shell
-
-  install -m 0755 "%{OUTPUT_FOLDER}"/chrome "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/chrome
-  sed 's#@binary@#%{CHROMIUM_LIB_DIR}/bin/chrome#' %{SOURCE1} > "%{buildroot}"%{_bindir}/chrome
-
+  install -m 0755 "%{OUTPUT_FOLDER}"/chrome_tizen "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/chrome_tizen
+  sed 's#@binary@#%{CHROMIUM_LIB_DIR}/bin/chrome_tizen#' %{SOURCE1} > "%{buildroot}"%{_bindir}/chrome_tizen
   install -m 0755 "%{OUTPUT_FOLDER}"/chrome_crashpad_handler "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/chrome_crashpad_handler
   sed 's#@binary@#%{CHROMIUM_LIB_DIR}/bin/chrome_crashpad_handler#' %{SOURCE1} > "%{buildroot}"%{_bindir}/chrome_crashpad_handler
-  install -m 0644 "%{OUTPUT_FOLDER}"/ui_resources_100_percent.pak "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/
   install -m 0644 "%{OUTPUT_FOLDER}"/locales/*.pak "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/locales
   install -m 0644 "%{OUTPUT_FOLDER}"/chrome_100_percent.pak "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/
   install -m 0644 "%{OUTPUT_FOLDER}"/resources.pak "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/
 %else
   install -m 0644 "%{OUTPUT_FOLDER}"/locales/efl/*.pak  "%{buildroot}"%{CHROMIUM_LIB_DIR}/bin/locales/
+%endif
+
   install -m 0755 "%{OUTPUT_FOLDER}"/libtest_trace_processor.so "%{buildroot}"%{_libdir}
   install -m 0755 "%{OUTPUT_FOLDER}"/efl_webprocess    "%{buildroot}"%{_bindir}/
   %if "%{?profile}" == "tv"
@@ -758,20 +755,19 @@ install -m 0644 third_party/electron_node/src/*.h "%{buildroot}"%{_includedir}/n
     %endif
   %endif
 
-  # org.tizen.chromium-efl Tizen App package
-  install -m 0755 "%{OUTPUT_FOLDER}"/efl_webview_app   "%{buildroot}"%{CHROMIUM_APP_DIR}/bin/
-  install -m 0755 "%{OUTPUT_FOLDER}"/mini_browser      "%{buildroot}"%{CHROMIUM_APP_DIR}/bin/
-  install -m 0755 "%{OUTPUT_FOLDER}"/ubrowser          "%{buildroot}"%{CHROMIUM_APP_DIR}/bin/
+# org.tizen.chromium-efl Tizen App package
+install -m 0755 "%{OUTPUT_FOLDER}"/efl_webview_app   "%{buildroot}"%{CHROMIUM_APP_DIR}/bin/
+install -m 0755 "%{OUTPUT_FOLDER}"/mini_browser      "%{buildroot}"%{CHROMIUM_APP_DIR}/bin/
+install -m 0755 "%{OUTPUT_FOLDER}"/ubrowser          "%{buildroot}"%{CHROMIUM_APP_DIR}/bin/
 
-  %if 0%{?__enable_ewk_interface}
-    install -m 0644 "%{OUTPUT_FOLDER}"/libchromium-impl.so "%{buildroot}"%{CHROMIUM_LIB_DIR}/lib/
-  %else
-    install -m 0644 "%{OUTPUT_FOLDER}"/libchromium-ewk.so  "%{buildroot}"%{CHROMIUM_LIB_DIR}/lib/
-  %endif
+%if 0%{?__enable_ewk_interface}
+  install -m 0644 "%{OUTPUT_FOLDER}"/libchromium-impl.so "%{buildroot}"%{CHROMIUM_LIB_DIR}/lib/
+%else
+  install -m 0644 "%{OUTPUT_FOLDER}"/libchromium-ewk.so  "%{buildroot}"%{CHROMIUM_LIB_DIR}/lib/
+%endif
 %if 0%{?__enable_platform_api_wrapper}
   install -m 0644 ./tizen_src/platform_api_wrapper/libchromium-efl-platform-api-wrapper.so "%{buildroot}"%{CHROMIUM_LIB_DIR}/lib/
 %endif
-%endif
 
 install -m 0644 "%{OUTPUT_FOLDER}"/resources/*.edj "%{buildroot}"%{CHROMIUM_LIB_DIR}/res/themes/
 
@@ -795,10 +791,7 @@ install -m 0644 "%{OUTPUT_FOLDER}"/tizen-manifest.xml "%{buildroot}"%{_xmldir}/%
   %define tizen_dist_sign 1
 %endif
 
-%if %{__build_chrome} != 1
 install -m 0644 "%{OUTPUT_FOLDER}"/images/*.png    "%{buildroot}"%{CHROMIUM_LIB_DIR}/res/images/
-%endif
-
 install -m 0644 "%{OUTPUT_FOLDER}"/resources/*.edj "%{buildroot}"%{CHROMIUM_LIB_DIR}/res/themes/
 
 %if "%{?__use_system_icu}" != "1"
@@ -830,12 +823,10 @@ install -m 0644 tizen_src/ewk/efl_integration/public/*.h "%{buildroot}"%{_includ
 install -d "%{buildroot}"%{_includedir}/v8
 install -m 0644 v8/include/*.h "%{buildroot}"%{_includedir}/v8/
 
-%if %{__build_chrome} != 1
-  # The native applications using ewk API from Tizen 2.x have a dependency about libewebkit2.so.
-  # The chromium-efl should support the backward compatibility of the native applications.
-  ln -s %{_libdir}/libchromium-ewk.so %{buildroot}%{_libdir}/libewebkit2.so.0
-  ln -s %{_libdir}/libewebkit2.so.0   %{buildroot}%{_libdir}/libewebkit2.so
-%endif
+# The native applications using ewk API from Tizen 2.x have a dependency about libewebkit2.so.
+# The chromium-efl should support the backward compatibility of the native applications.
+ln -s %{_libdir}/libchromium-ewk.so %{buildroot}%{_libdir}/libewebkit2.so.0
+ln -s %{_libdir}/libewebkit2.so.0   %{buildroot}%{_libdir}/libewebkit2.so
 
 %if 0%{?__make_squashfs_rpm}
   install -d "%{buildroot}"%{CHROMIUM_APP_DIR}/res
@@ -914,17 +905,15 @@ install -m 0755 -p -D %{OUTPUT_FOLDER}/ppapi_unittests %{buildroot}/opt/usr/utc_
   install -m 0755 %{OUTPUT_FOLDER}/wrt                            %{buildroot}%{_bindir}
   ln -s %{_bindir}/wrt                                            %{buildroot}%{_bindir}/wrt-client
   install -m 0755 wrt/wrt_env.sh                                  %{buildroot}%{_sysconfdir}/profile.d/
-  %if %{__build_chrome} != 1
-    install -m 0644 %{OUTPUT_FOLDER}/wrt_resources.pak            %{buildroot}%{CHROMIUM_LIB_DIR}/bin/
-    install -m 0644 %{OUTPUT_FOLDER}/libsplash_screen_plugin.so   %{buildroot}%{__xwalk_extension_path}
-    install -m 0644 %{OUTPUT_FOLDER}/libwidget_plugin.so          %{buildroot}%{__xwalk_extension_path}
-    install -m 0644 %{OUTPUT_FOLDER}/libwrt-service-override.so   %{buildroot}%{__xwalk_extension_path}
-    install -m 0644 %{OUTPUT_FOLDER}/gen/tizen_src/chromium_impl/components/xwalk_extensions/splash_screen_plugin/splash_screen.json \
+  install -m 0644 %{OUTPUT_FOLDER}/wrt_resources.pak              %{buildroot}%{CHROMIUM_LIB_DIR}/bin/
+  install -m 0644 %{OUTPUT_FOLDER}/libsplash_screen_plugin.so     %{buildroot}%{__xwalk_extension_path}
+  install -m 0644 %{OUTPUT_FOLDER}/libwidget_plugin.so            %{buildroot}%{__xwalk_extension_path}
+  install -m 0644 %{OUTPUT_FOLDER}/libwrt-service-override.so     %{buildroot}%{__xwalk_extension_path}
+  install -m 0644 %{OUTPUT_FOLDER}/gen/tizen_src/chromium_impl/components/xwalk_extensions/splash_screen_plugin/splash_screen.json \
                                                                   %{buildroot}%{__xwalk_extension_path}
-    install -m 0644 %{OUTPUT_FOLDER}/gen/tizen_src/chromium_impl/components/xwalk_extensions/widget_plugin/widget.json \
+  install -m 0644 %{OUTPUT_FOLDER}/gen/tizen_src/chromium_impl/components/xwalk_extensions/widget_plugin/widget.json \
                                                                   %{buildroot}%{__xwalk_extension_path}
-    install -m 0644 %{OUTPUT_FOLDER}/gen/wrt/resources/*.edj      %{buildroot}%{CHROMIUM_LIB_DIR}/res/themes/
-  %endif
+  install -m 0644 %{OUTPUT_FOLDER}/gen/wrt/resources/*.edj        %{buildroot}%{CHROMIUM_LIB_DIR}/res/themes/
   %if "%{?profile}" == "wearable"
     # Popup icons
     cp wrt/resources/icons/*.png                                  %{buildroot}%{_datadir}/icons/wrtjs/
@@ -1110,51 +1099,52 @@ rm -rf %{CHROMIUM_TPK_DIR}/%{_tpk_file_name}.tpk
 %if %{__build_chrome} == 1
   %{CHROMIUM_LIB_DIR}/bin/chrome_100_percent.pak
   %{CHROMIUM_LIB_DIR}/bin/resources.pak
-  %{CHROMIUM_LIB_DIR}/bin/ui_resources_100_percent.pak
-  %{CHROMIUM_LIB_DIR}/bin/content_shell
-  %{_bindir}/content_shell
-  %{CHROMIUM_LIB_DIR}/bin/chrome
-  %{_bindir}/chrome
+  %{CHROMIUM_LIB_DIR}/bin/chrome_tizen
+  %{_bindir}/chrome_tizen
   %{CHROMIUM_LIB_DIR}/bin/chrome_crashpad_handler
   %{_bindir}/chrome_crashpad_handler
-%else
+%endif
   %{CHROMIUM_LIB_DIR}/res/locale/*
   %{_libdir}/libchromium-ewk.so
   %{_libdir}/libtest_trace_processor.so
   %{_libdir}/libewebkit2.so*
   %if 0%{?__enable_squashfs_image}
     %if "%{?tizen_profile_name}" == "tv"
-      %{_bindir}/chromium-efl-install
-      %{_unitdir_user}/chromium-efl-vd.service
-      %{_unitdir_user}/default.target.wants/chromium-efl-vd.service
-      %dir %{CHROMIUM_LIB_UPGRADE_DIR}
-    %else
-      %{_unitdir}/chromium-efl.service
-      %{_unitdir}/multi-user.target.wants/chromium-efl.service
-      %{_unitdir}/chromium-efl-update.service
-      %{_unitdir}/multi-user.target.wants/chromium-efl-update.service
-    %endif
-  %endif
-  %{CHROMIUM_APP_DIR}/bin/efl_webview_app
-  %{CHROMIUM_APP_DIR}/bin/mini_browser
-  %{CHROMIUM_APP_DIR}/bin/ubrowser
-
-  %if "%{?tizen_profile_name}" == "tv"
-    %caps(cap_mac_admin,cap_mac_override,cap_setgid=ei) %{_bindir}/efl_webprocess
-    %{_bindir}/efl_pluginprocess
-  %else
-    %{_bindir}/efl_webprocess
-  %endif
-  %if 0%{?__enable_ewk_interface}
-    %{CHROMIUM_LIB_DIR}/lib/libchromium-impl.so
+       %{_bindir}/chromium-efl-install
+    %{_unitdir_user}/chromium-efl-vd.service
+    %{_unitdir_user}/default.target.wants/chromium-efl-vd.service
+    %dir %{CHROMIUM_LIB_UPGRADE_DIR}
   %else
-    %{CHROMIUM_LIB_DIR}/lib/libchromium-ewk.so
+    %{_unitdir}/chromium-efl.service
+    %{_unitdir}/multi-user.target.wants/chromium-efl.service
+    %{_unitdir}/chromium-efl-update.service
+    %{_unitdir}/multi-user.target.wants/chromium-efl-update.service
   %endif
+%endif
+%{CHROMIUM_APP_DIR}/bin/efl_webview_app
+%{CHROMIUM_APP_DIR}/bin/mini_browser
+%{CHROMIUM_APP_DIR}/bin/ubrowser
+
+%if "%{?tizen_profile_name}" == "tv"
+  %caps(cap_mac_admin,cap_mac_override,cap_setgid=ei) %{_bindir}/efl_webprocess
+  %{_bindir}/efl_pluginprocess
+%else
+  %{_bindir}/efl_webprocess
+%endif
+
+%if 0%{?__enable_ewk_interface}
+  %{CHROMIUM_LIB_DIR}/lib/libchromium-impl.so
+%else
+  %{CHROMIUM_LIB_DIR}/lib/libchromium-ewk.so
+%endif
 %if 0%{?__enable_platform_api_wrapper}
   %{CHROMIUM_LIB_DIR}/lib/libchromium-efl-platform-api-wrapper.so
 %endif
-  %{CHROMIUM_LIB_DIR}/res/images/*.png
-%endif
+
+%{CHROMIUM_LIB_DIR}/res/images/*.png
+
+%{CHROMIUM_LIB_DIR}/res/themes/*.edj
+%{CHROMIUM_LIB_DIR}/res/locale/*
 
 %if "%{?__use_system_icu}" != "1"
   %{CHROMIUM_LIB_DIR}/bin/icudtl.dat
@@ -1169,18 +1159,16 @@ rm -rf %{CHROMIUM_TPK_DIR}/%{_tpk_file_name}.tpk
     %endif
   %else
     %{_bindir}/wrt
-  %endif
+%endif
   %{_bindir}/wrt-client
   %{_sysconfdir}/profile.d/wrt_env.sh
   %{CHROMIUM_LIB_DIR}/lib/libwrt-c++wrapper.so
-  %if %{__build_chrome} != 1
-    %{CHROMIUM_LIB_DIR}/bin/wrt_resources.pak
-    %{__xwalk_extension_path}/libsplash_screen_plugin.so
-    %{__xwalk_extension_path}/libwidget_plugin.so
-    %{__xwalk_extension_path}/libwrt-service-override.so
-    %{__xwalk_extension_path}/splash_screen.json
-    %{__xwalk_extension_path}/widget.json
-  %endif
+  %{CHROMIUM_LIB_DIR}/bin/wrt_resources.pak
+  %{__xwalk_extension_path}/libsplash_screen_plugin.so
+  %{__xwalk_extension_path}/libwidget_plugin.so
+  %{__xwalk_extension_path}/libwrt-service-override.so
+  %{__xwalk_extension_path}/splash_screen.json
+  %{__xwalk_extension_path}/widget.json
   %if "%{?profile}" != "tv"
     %{_datadir}/edje/wrtjs/*.edj
     %{_datadir}/locale/*
index 03302777935babf324427c0802bf905de415bc78..26635c802e6f6b761bf7fa196a0c4ea81a115bcf 100644 (file)
@@ -68,7 +68,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
 
   ResetSettings();
 
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_TIZEN)
   if (!ui::LinuxUi::instance())
     return mojom::ResultCode::kSuccess;
 
@@ -84,7 +84,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
 }
 
 gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_TIZEN)
   if (ui::LinuxUi::instance())
     return ui::LinuxUi::instance()->GetPdfPaperSize(this);
 #endif
@@ -97,7 +97,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
   DCHECK(!printer_settings.show_system_dialog);
   DCHECK(!in_print_job_);
 
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_TIZEN)
   if (!ui::LinuxUi::instance())
     return mojom::ResultCode::kSuccess;
 
index 107db8b769686a553a22bfa5a8d263080dc8d43c..92244928d01376969017693040da2fc6c79a90ce 100644 (file)
@@ -199,7 +199,7 @@ LocationArbitrator::NewNetworkLocationProvider(
 
 std::unique_ptr<LocationProvider>
 LocationArbitrator::NewSystemLocationProvider() {
-#if BUILDFLAG(IS_TIZEN) && !defined(BUILD_CHROME)
+#if BUILDFLAG(IS_TIZEN)
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kEnableOffscreenRendering)) {
     return device::NewSystemLocationProvider();
index f3ebae744a2a8122baf0c8dc61bc65421da8bf17..d689857e7afcf641172dd3bb20d4d4c180c23ed5 100644 (file)
@@ -40,7 +40,7 @@ void DocumentModuleScriptFetcher::Fetch(
   DCHECK(!client_);
   client_ = client;
   expected_module_type_ = expected_module_type;
-#if defined(ENABLE_WRT_JS) && !defined(BUILD_CHROME)
+#if defined(ENABLE_WRT_JS)
   if (wrt::WRTModuleScriptFetcher::Fetch(fetch_params, client))
     return;
 #endif
index 171a9fd210c269e47d021696b1fc6daaa700f860..f5ef36eb6126994b0014f8e5196d813a0a7fda6b 100644 (file)
@@ -874,10 +874,7 @@ tizen_pkg_config("accessory") {
 }
 
 tizen_pkg_config("autoinput") {
-  packages = []
-  if (tizen_vd_accessory) {
-    packages = [ "autoinput" ]
-  }
+  packages = [ "autoinput" ]
 }
 
 if (enable_wrt_js) {
index e08f0e7601d3749388021293349454d8478aeda8..5ee67a51735237456de0e865d54b4b9e5796927d 100755 (executable)
@@ -243,6 +243,7 @@ function setupAndExecuteTargetBuild() {
   local RELEASE_BUILD=0
   local MAKE_SQUASHFS_RPM=0
   local LOCAL_BUILD_JOBS=""
+  local BUILD_CHROME=0
 
   # "|| :" means "or always succeeding built-in command"
   PROFILE=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" | head -1 || :)
@@ -317,6 +318,7 @@ function setupAndExecuteTargetBuild() {
     --tizen*)
     ;;
     --build-chrome)
+        BUILD_CHROME=1
         ARGS+=(--define "_build_chrome 1")
     ;;
     -j*)
@@ -399,7 +401,11 @@ function setupAndExecuteTargetBuild() {
   if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
     CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
     if [ "$GBS_ROOT" == "" ]; then
-      GBS_ROOT_OPT="-B ~/GBS-ROOT-M${CHROMIUM_VERSION}-${PROFILE^^}-TIZEN_${DEFAULT_TIZEN_VERSION^^}-${BRANCH^^}"
+      if [ "$BUILD_CHROME" == "1" ]; then
+        GBS_ROOT_OPT="-B ~/GBS-ROOT-M${CHROMIUM_VERSION}-${PROFILE^^}-TIZEN_${DEFAULT_TIZEN_VERSION^^}-CHROME-${BRANCH^^}"
+      else
+        GBS_ROOT_OPT="-B ~/GBS-ROOT-M${CHROMIUM_VERSION}-${PROFILE^^}-TIZEN_${DEFAULT_TIZEN_VERSION^^}-${BRANCH^^}"
+      fi
     else
       GBS_ROOT_OPT="-B $GBS_ROOT"
     fi
index b90de5221b087db8819f439877bbbb131aafb2f2..c8030e32ee98b2799e1a865e2e520bc17c60bfe8 100644 (file)
@@ -79,7 +79,7 @@ declare_args() {
   tizen_tv_riscv64 = false
 }
 
-if (use_efl && !build_chrome) {
+if (use_efl) {
   tizen_autofill = true
   if (tizen_product_tv) {
     tizen_autofill_fw = true
index 47092d8c222f91a1c6ab016e049b904a5703d264..07ff796296401224949d523909ce1d997361fee2 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "base/command_line.h"
 #include "content/public/common/content_switches.h"
-#include "third_party/blink/public/platform/web_application_type.h"
 #include "tizen_src/chromium_impl/media/filters/esplusplayer_util.h"
 #include "tizen_src/chromium_impl/tizen/tizen_tv_platform.h"
 #include "tizen_src/ewk/efl_integration/common/application_type.h"
index 2d932f322b8a100c22cbfaaff51e6b616690d6fb..9ab03c5d4f1611e2d461ceb06814bbc06e31211e 100644 (file)
@@ -583,6 +583,18 @@ int WRTServiceMain(int argc, char** argv) {
 }
 #endif
 
+#if defined(BUILD_CHROME)
+__attribute__((visibility("default"))) int ChromeMain(int argc,
+                                                      const char** argv) {
+  LOG(INFO) << "EWK-INTERFACE : ChromeMain called..";
+  typedef int (*func_ptr_t)(int argc, const char** argv);
+  func_ptr_t fp = reinterpret_cast<func_ptr_t>(ewk_dlsym("ChromeMain"));
+  if (fp)
+    return fp(argc, argv);
+  return 0;
+}
+#endif  // defined(BUILD_CHROME)
+
 #ifdef __cplusplus
 }
 #endif
index 18a1d58ce525675b756d5e7e0855ae77eccdf070..52f4727521ba2f84f051578c01d790bdd9f3c7d5 100644 (file)
@@ -42,6 +42,8 @@
     WRTServiceMain;
     ime_app_main;
     node_module_register;
+    # CHROMIUM BROWSER
+    ChromeMain;
 
   local: *;
 };
index f99eace12aee5b2f683b741227c8865b523b4d9a..349c40e852dc7bdc902522414fb2940aa81815c5 100644 (file)
@@ -116,6 +116,9 @@ shared_library("chromium-ewk") {
     "//v8",
   ]
 
+  if (build_chrome && is_tizen) {
+    deps += [ "//chrome:chrome_lib" ]
+  }
   if (enable_printing) {
     deps += [ "//printing" ]
   }
index 987c2c62ac36a6a428cccdcdf1dc9a6a5567f047..09d8a1a15f0909e058ca3a6e833dffd1c58d931c 100644 (file)
@@ -21,6 +21,8 @@
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/shared_impl/var_tracker.h"
 
+namespace pepper {
+
 PepperSharedMemoryMessageFilter::PepperSharedMemoryMessageFilter(
     content::RendererPpapiHost* host)
     : InstanceMessageFilter(host->GetPpapiHost()), host_(host) {}
@@ -63,3 +65,5 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
           ->GetVarTracker()
           ->TrackSharedMemoryRegion(instance, std::move(shm), size);
 }
+
+}  // namespace pepper
\ No newline at end of file
index c425868e7f56b1a26bbc79f5c5fe3383c25e3787..11b224bd30acfea825b00dc743f743a05a3d5ff7 100644 (file)
@@ -25,6 +25,8 @@ class SerializedHandle;
 }
 }  // namespace ppapi
 
+namespace pepper {
+
 // Implements the backend for shared memory messages from a plugin process.
 class PepperSharedMemoryMessageFilter
     : public ppapi::host::InstanceMessageFilter {
@@ -48,4 +50,6 @@ class PepperSharedMemoryMessageFilter
   content::RendererPpapiHost* host_;
 };
 
+}  // namespace pepper
+
 #endif  // RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
index 3cc82d28b417a2c0faab553570144d064da69c8c..75bdbd47a5cbd33070bc8f6eafd18ba1a134d450 100644 (file)
@@ -535,8 +535,6 @@ static_library("wrt_lib") {
       "//components/printing/browser/print_to_pdf/pdf_print_utils.h",
       "//electron/shell/browser/printing/print_view_manager_electron.cc",
       "//electron/shell/browser/printing/print_view_manager_electron.h",
-      "//electron/shell/browser/printing/printing_utils.cc",
-      "//electron/shell/browser/printing/printing_utils.h",
       "//electron/shell/renderer/printing/print_render_frame_helper_delegate.cc",
       "//electron/shell/renderer/printing/print_render_frame_helper_delegate.h",
     ]