[NextBrowser] Removing SIDs which are common in NextBrowser and UWE. 85/315585/3
authorTarun Verma <tarun1.verma@samsung.com>
Tue, 3 Dec 2024 08:41:28 +0000 (14:11 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 3 Dec 2024 12:10:25 +0000 (12:10 +0000)
NextBrowser will query UWE for SIDs which are not present in NextBrowser.

Change-Id: Id8db35e79b9ccdb640e79b77d3510c6b8e1e0e0b
Signed-off-by: Tarun Verma <tarun1.verma@samsung.com>
chrome/chrome_repack_locales.gni
ui/base/BUILD.gn
ui/base/resource/resource_bundle.cc

index fdb87c7e75342b891adb6a17f16f26875342cc0f..85fc7b7a27efe013ef12bea1dcd90a4c553aea89 100644 (file)
@@ -40,6 +40,17 @@ template("chrome_repack_locales") {
       "${root_gen_dir}/ui/strings/ax_strings_",
       "${root_gen_dir}/ui/strings/ui_strings_",
     ]
+    if (tizen_product_tv && is_samsung_next_browser) {
+      source_patterns -= [
+        "${root_gen_dir}/components/strings/components_locale_settings_",
+        "${root_gen_dir}/components/strings/components_strings_",
+        "${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
+        "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
+        "${root_gen_dir}/third_party/libaddressinput/address_input_strings_",
+        "${root_gen_dir}/ui/strings/app_locale_settings_",
+        "${root_gen_dir}/ui/strings/ui_strings_",
+      ]
+    }
     if (!defined(deps)) {
       deps = []
     }
@@ -96,6 +107,10 @@ template("chrome_repack_locales") {
     if (enable_extensions) {
       source_patterns +=
           [ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
+      if (tizen_product_tv && is_samsung_next_browser){
+        source_patterns -=
+            [  "${root_gen_dir}/extensions/strings/extensions_strings_" ]
+      }
       deps += [ "//extensions/strings" ]
     }
 
index 98ab046500076c0754242482006311854f3517d0..933a393a69ff303c64d241e088d098fd67a35c6a 100644 (file)
@@ -667,6 +667,9 @@ component("base") {
     include_dirs = external_ui_base_includes
     sources += external_ui_base_sources
   }
+  if (tizen_product_tv && is_samsung_next_browser) {
+    defines += [ "SAMSUNG_NEXT_BROWSER" ]
+  }
 }
 
 if (is_ios) {
index 3397530ea0f3d3f06666dc5664dabf39d58a522e..990014ed86d96480db396846de986c94e96d2127 100644 (file)
@@ -79,6 +79,10 @@ const size_t kPngChunkMetadataSize = 12;  // length, type, crc32
 const unsigned char kPngScaleChunkType[4] = { 'c', 's', 'C', 'l' };
 const unsigned char kPngDataChunkType[4] = { 'I', 'D', 'A', 'T' };
 
+#if defined(SAMSUNG_NEXT_BROWSER)
+const char kUWELocalesPath[] = "/usr/share/chromium-efl/upgrade/bin/locales";
+#endif
+
 #if !BUILDFLAG(IS_APPLE)
 const char kPakFileExtension[] = ".pak";
 #endif
@@ -481,6 +485,17 @@ std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale,
   }
 
   locale_resources_data_ = std::move(data_pack);
+
+#if defined(SAMSUNG_NEXT_BROWSER)
+  base::FilePath locale_secondary_file_path = base::FilePath(kUWELocalesPath);
+  locale_secondary_file_path =
+      locale_secondary_file_path.AppendASCII(app_locale + kPakFileExtension);
+  auto data_pack_secondary = std::make_unique<DataPack>(k100Percent);
+  if (!data_pack_secondary->LoadFromPath(locale_secondary_file_path)) {
+    LOG(INFO) << "Failed to create secondary locales";
+  }
+  secondary_locale_resources_data_ = std::move(data_pack_secondary);
+#endif
   loaded_locale_ = pref_locale;
   return app_locale;
 }