[M126][Tizen][Onscreen] Fix build errors for tizen standard profile for 50/316450/6
authorChandan Padhi <c.padhi@samsung.com>
Wed, 21 Aug 2024 12:35:37 +0000 (18:05 +0530)
committerv-saha <v.saha@samsung.com>
Tue, 27 Aug 2024 07:14:13 +0000 (12:44 +0530)
Chrome

This commit fixes all gn related, compilation and linker errors
for tizen standard chrome build.

Change-Id: Icc7dc9f2cfabda9e3679432a53743174137bef2b
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
24 files changed:
chrome/browser/BUILD.gn
chrome/browser/extensions/api/settings_private/prefs_util.cc
chrome/browser/metrics/structured/BUILD.gn
chrome/browser/resources/settings/BUILD.gn
chrome/browser/shortcuts/BUILD.gn
chrome/browser/ui/BUILD.gn
chrome/browser/ui/views/accelerator_table.cc
chrome/browser/ui/views/frame/browser_view.cc
chrome/browser/ui/views/frame/browser_view.h
components/components_strings.grd
components/crash/core/app/BUILD.gn
components/omnibox/browser/BUILD.gn
components/omnibox_strings.grdp
components/password_manager_strings.grdp
components/policy_strings.grdp
components/search_engines/BUILD.gn
components/version_ui_strings.grdp
content/utility/BUILD.gn
packaging/chromium-efl.spec
services/screen_ai/BUILD.gn
services/screen_ai/buildflags/features.gni
tizen_src/build/config/tizen_features.gni
tizen_src/build/gn_chromiumefl.sh
tools/grit/grit_args.gni

index 7f521813f2ad966d85581328a466380a2ff5b007..87d11261a8ccf89878a6967b6bd06d47988032e9 100644 (file)
@@ -6845,7 +6845,7 @@ static_library("browser") {
   }
 
   # General Structured Metrics Dependencies needed by these platforms.
-  if (is_win || is_mac || is_linux || is_chromeos) {
+  if (is_win || is_mac || is_linux || is_chromeos || is_tizen) {
     sources += [
       "metrics/structured/chrome_structured_metrics_delegate.cc",
       "metrics/structured/chrome_structured_metrics_delegate.h",
@@ -7014,7 +7014,7 @@ static_library("browser") {
     deps += [ "//ui/linux:display_server_utils" ]
   }
 
-  if (is_win || is_linux || is_chromeos) {
+  if (is_win || is_linux || is_chromeos || is_tizen) {
     sources += [
       "policy/messaging_layer/util/manual_test_heartbeat_event.cc",
       "policy/messaging_layer/util/manual_test_heartbeat_event.h",
index b16b682230b8f3feae2b62f0f7696118d7e5184e..42b7c1cc617d876a8550243240ea6381d30df6fd 100644 (file)
@@ -471,10 +471,13 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() {
   (*s_allowlist)
       [::permissions::prefs::kUnusedSitePermissionsRevocationEnabled] =
           settings_api::PrefType::kBoolean;
+
+#if BUILDFLAG(ENABLE_COMPOSE)
   (*s_allowlist)[prefs::kEnableProactiveNudge] =
       settings_api::PrefType::kBoolean;
   (*s_allowlist)[prefs::kProactiveNudgeDisabledSitesWithTime] =
       settings_api::PrefType::kDictionary;
+#endif
 
   // Clear browsing data settings.
   (*s_allowlist)[browsing_data::prefs::kDeleteBrowsingHistory] =
index 38f7e9ae9f50a99924b7a8768c14a08822cd9b11..8aa32f270ab4a8cb55769acc9ee3e74df6828019 100644 (file)
@@ -17,7 +17,7 @@ source_set("structured") {
 
   if (is_chromeos_ash) {
     deps += [ "//components/metrics/structured:external_metrics" ]
-  } else if (is_win || is_linux || is_mac || is_chromeos_lacros) {
+  } else if (is_win || is_linux || is_mac || is_chromeos_lacros || is_tizen) {
     sources += [
       "chrome_event_storage.cc",
       "chrome_event_storage.h",
index c9bf75334f53426d40cbb58405dd431508c057b7..b1c7eb6baf7cbc9889451cd76b6dcb35758f06ef 100644 (file)
@@ -255,7 +255,7 @@ build_webui("build") {
   if (is_win || is_mac) {
     web_component_files += [ "autofill_page/passkeys_subpage.ts" ]
   }
-  if (is_win || is_mac || is_linux) {
+  if (is_win || is_mac || is_linux || is_tizen) {
     web_component_files += [ "a11y_page/pdf_ocr_toggle.ts" ]
   }
   if (is_chrome_branded) {
index 756ce7f1ed617f1fbe0079e57b8f72f69d77cb67..2cb2b6ee9071e1690fb6262779d1d0c8d2542ecb 100644 (file)
@@ -76,7 +76,7 @@ source_set("shortcuts") {
     ]
   }
 
-  if (is_linux) {
+  if (is_linux || is_tizen) {
     sources += [
       "linux_xdg_wrapper.h",
       "linux_xdg_wrapper_impl.cc",
index e12bd9aaaaac9ac64394beca1eec7aacdd0c1552..d00a180b6f3211b40ef652cfacefdf8e14338de7 100644 (file)
@@ -733,7 +733,7 @@ static_library("ui") {
     "//v8:v8_version",
   ]
 
-  if (is_win || is_linux || is_mac) {
+  if (is_win || is_linux || is_mac || is_tizen) {
     deps += [ "//chrome/browser/shortcuts:shortcuts" ]
   }
 
@@ -756,7 +756,7 @@ static_library("ui") {
     deps += [ "//chrome/browser/vr:vr_base" ]
   }
 
-  if (is_win || is_linux || is_mac || is_chromeos) {
+  if (is_win || is_linux || is_mac || is_chromeos || is_tizen) {
     sources += [
       "passwords/password_cross_domain_confirmation_popup_controller_impl.cc",
       "passwords/password_cross_domain_confirmation_popup_controller_impl.h",
index 38421ff8de961ea32c80e281ff24c7b1b6f5e816..3747da4aaf629407af9a2234501a8b15d24d2380 100644 (file)
 #include "ui/base/ui_base_features.h"
 #include "ui/events/event_constants.h"
 
-#if BUILDFLAG(IS_TIZEN)
-#include <bits/range_access.h>
-#endif
-
 #if BUILDFLAG(IS_CHROMEOS_ASH)
 #include "chrome/browser/ash/crosapi/browser_util.h"
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
index 4b52ce3877855040f91fc48afdcbbd347e30a8c0..9263fed6f9fb67168a89b411ae6132e76762ffe7 100644 (file)
@@ -941,10 +941,13 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
     watermark_view_ = contents_container->AddChildView(
         std::make_unique<enterprise_watermark::WatermarkView>());
   }
-#endif  // BUILDFLAG(ENTERPRISE_WATERMARK)
 
   contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
       devtools_web_view_, contents_web_view_, watermark_view_));
+#else
+  contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
+      devtools_web_view_, contents_web_view_, nullptr));
+#endif  // BUILDFLAG(ENTERPRISE_WATERMARK)
 
   toolbar_ = top_container_->AddChildView(
       std::make_unique<ToolbarView>(browser_.get(), this));
@@ -5463,6 +5466,7 @@ void BrowserView::UpdateFullscreenAllowedFromPolicy(
   }
 }
 
+#if BUILDFLAG(ENTERPRISE_WATERMARK)
 void BrowserView::ApplyDataProtectionSettings(
     base::WeakPtr<content::WebContents> expected_web_contents,
     const enterprise_data_protection::UrlSettings& settings) {
@@ -5508,6 +5512,7 @@ void BrowserView::DelayApplyDataProtectionSettingsIfEmpty(
         .Run();
   }
 }
+#endif
 
 BEGIN_METADATA(BrowserView)
 ADD_READONLY_PROPERTY_METADATA(gfx::Rect, FindBarBoundingBox)
index e7337adf73cafde6d1f7b06a9ad40b96e5ecc093..e6fbc90e6b6f9a66ed3c36a18526a8a802464197 100644 (file)
@@ -834,9 +834,11 @@ class BrowserView : public BrowserWindow,
     return web_app_frame_toolbar();
   }
 
+#if BUILDFLAG(ENTERPRISE_WATERMARK)
   enterprise_watermark::WatermarkView* get_watermark_view_for_testing() {
     return watermark_view_;
   }
+#endif
 
   void set_on_delay_apply_data_protection_settings_if_empty_called_for_testing(
       base::OnceClosure closure) {
@@ -1074,6 +1076,7 @@ class BrowserView : public BrowserWindow,
   // when it should not be able to.
   void UpdateFullscreenAllowedFromPolicy(bool allowed_without_policy);
 
+#if BUILDFLAG(ENTERPRISE_WATERMARK)
   // Applies data protection settings based on the verdict received by
   // safe-browsing's realtime to `watermark_view_`.
   void ApplyDataProtectionSettings(
@@ -1094,6 +1097,7 @@ class BrowserView : public BrowserWindow,
   void DelayApplyDataProtectionSettingsIfEmpty(
       base::WeakPtr<content::WebContents> expected_web_contents,
       const enterprise_data_protection::UrlSettings& settings);
+#endif
 
   // The BrowserFrame that hosts this view.
   raw_ptr<BrowserFrame, DanglingUntriaged> frame_ = nullptr;
@@ -1221,8 +1225,10 @@ class BrowserView : public BrowserWindow,
   // Clear watermark text once the page loads.
   bool clear_watermark_text_on_page_load_ = false;
 
+#if BUILDFLAG(ENTERPRISE_WATERMARK)
   // The view that overlays a watermark on the contents container.
   raw_ptr<enterprise_watermark::WatermarkView> watermark_view_ = nullptr;
+#endif
 
   // The view managing the devtools and contents positions.
   // Handled by ContentsLayoutManager.
index 05c39e8c444fce83a6700d8c5a2c559678577638..d091751a8ebc7fc3491b6114d0e592c45e18c645 100644 (file)
       <part file="autofill_payments_strings.grdp" />
       <part file="autofill_strings.grdp" />
       <part file="bookmark_bar_strings.grdp" />
-      <if expr="not is_tizen">
+      <if expr="build_chrome">
       <part file="bookmark_component_strings.grdp" />
       </if>
       <part file="blocked_content_strings.grdp" />
       <part file="compose_strings.grdp" />
       <part file="live_caption_strings.grdp" />
       <part file="components_settings_strings.grdp" />
-      <if expr="not is_tizen">
+      <if expr="build_chrome">
       <part file="crash_strings.grdp" />
       </if>
       <part file="dialog_strings.grdp" />
       <part file="dom_distiller_strings.grdp" />
       <part file="enterprise_strings.grdp" />
       <part file="error_page_strings.grdp" />
-      <if expr="not is_tizen">
+      <if expr="build_chrome">
       <part file="find_in_page_strings.grdp" />
       <part file="history_strings.grdp" />
       <part file="login_dialog_strings.grdp" />
       <part file="ssl_errors_strings.grdp" />
       <part file="subresource_filter_strings.grdp" />
       <part file="supervised_user_strings.grdp" />
-      <if expr="not is_tizen">
+      <if expr="build_chrome">
       <part file="sync_ui_strings.grdp" />
       </if>
       <part file="translate_strings.grdp" />
       <message name="IDS_OK" desc="Used for OK on buttons">
         OK
       </message>
-      <if expr="not is_tizen">
+      <if expr="build_chrome">
       <message name="IDS_RELOAD" desc="Used for Reload on buttons">
         Reload
       </message>
       <message name="IDS_UTILITY_PROCESS_JSON_PARSER_NAME" desc="The name of the utility process used for parsing JSON files.">
         JSON Parser
       </message>
-      <if expr="not is_tizen">
+      <if expr="build_chrome">
       <message name="IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON" desc="Title of the restore button in the session crashed view.">
         Restore
       </message>
index b0b1f32ffd1b9d14cdb45e2975d0dd4321392414..b3940d05b426f45feaffc9c531afa9e4d98872be 100644 (file)
@@ -95,7 +95,7 @@ static_library("app") {
     "//third_party/crashpad/crashpad/util",
   ]
 
-  if (is_linux || is_chromeos) {
+  if (is_linux || is_chromeos || is_tizen) {
     sources += [ "crashpad_linux.cc" ]
     data_deps = [ ":chrome_crashpad_handler" ]
   }
index 8369f38591908bf93afebfc0c026ea27a5d3c9e5..4cd27a185ccde1de494617b1d1c5be30cd37d9da 100644 (file)
@@ -117,7 +117,7 @@ aggregate_vector_icons("omnibox_vector_icons") {
     ]
   }
 
-  if (is_linux) {
+  if (is_linux || is_tizen) {
     sources += [ "share_linux_chrome_refresh.icon" ]
   }
 }
index f70b83551d74c9ded4640feb8064a0cd5894cd25..949eff608d160037befa6ca73af6e9c480feab71 100644 (file)
@@ -32,7 +32,7 @@
       Image you copied
     </message>
   </if>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <message name="IDS_SECURE_CONNECTION_EV" desc="Short text shown in the location bar when the connection is secure with an EV cert.">
     <ph name="ORGANIZATION">$1<ex>Paypal Inc.</ex></ph> [<ph name="COUNTRY">$2<ex>US</ex></ph>]
   </message>
@@ -69,7 +69,7 @@
       Search the web in Chrome
     </message>
   </if>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <message name="IDS_OMNIBOX_ADDITIONAL_TEXT_DASH_TEMPLATE" desc="The omnibox text when there is both traditional text (i.e., user text + inline autocompletion) and additional text (i.e. the default suggestion's URL when rich autocompleting a title) to display.">
     <ph name="TRADITIONAL_TEXT">$1</ph> - <ph name="ADDITIONAL_TEXT">$2</ph>
   </message>
index b3d5b438b3eabaf73bbf040343de74714f144217..8a39c392c97fb3421d303b7be5418e416f944704 100644 (file)
@@ -75,7 +75,7 @@
       Suggest strong password…
     </message>
   </if>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <if expr="use_titlecase">
     <message name="IDS_PASSWORD_MANAGER_MANAGE_PASSWORDS" desc="The menu item in the password field drop down that opens the list of saved passwords.">
       Manage Passwords…
index 2f201dee92888b8458ce36411a78c041ba9856e9..6a63c006881e829ae0872a4b3c4d53c669c3fbc4 100644 (file)
@@ -438,7 +438,7 @@ Additional details:
   <message name="IDS_POLICY_RELOAD_POLICIES_DONE" desc="Toast notification message indicating policies have been reloaded.">
     Policies reloaded
   </message>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <message name="IDS_EXPORT_POLICIES_JSON" desc="Label for the button that exports policies in JSON format.">
     Export to JSON
   </message>
@@ -671,7 +671,7 @@ Additional details:
   <message name="IDS_POLICY_SOURCE_DEVICE_LOCAL_ACCOUNT_OVERRIDE" desc="Indicates that the policy is set programmatically because of an active device-local account session: managed session or Kiosk app (both for ChromeOS only). It could have overridden other sources that set this policy.">
     Device local account override
   </message>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <message name="IDS_POLICY_RISK_TAG_FULL_ADMIN_ACCESS" desc="Title of a group/tag whose policies potentially allow the administrator to access all of a user's data.">
     Full Admin Access
   </message>
index 92423a8178c0faa37716260b9932d70062f21bf0..31f3701164cebdb142de698a7d3b799be91442c5 100644 (file)
@@ -121,7 +121,7 @@ static_library("search_engines") {
     ]
   }
 
-  if (is_linux || is_win || is_mac || is_chromeos) {
+  if (is_linux || is_win || is_mac || is_chromeos || is_tizen) {
     sources += [
       "site_search_policy_handler.cc",
       "site_search_policy_handler.h",
index 89453a3d59f0946c00c7c5ed79fcc5e2addbff74..b55edca3f0230cab1eaf63ddc577e33ad8f6f66d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <grit-part>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <message name="IDS_VERSION_UI_TITLE" desc="Title on the about:version page">
     About Version
   </message>
@@ -11,7 +11,7 @@
   <message name="IDS_VERSION_UI_UNOFFICIAL" desc="unofficial build on the about:version page">
     Developer Build
   </message>
-  <if expr="not is_tizen">
+  <if expr="build_chrome">
   <message name="IDS_VERSION_UI_32BIT" desc="32-bit on the chrome://version page">
     (32-bit)
   </message>
index a4b911c3e6b081e5d43fd6a85a7c85b5cfc7b22c..41b0a5221d5dab46718354f44841ce6839186773 100644 (file)
@@ -142,7 +142,7 @@ source_set("utility") {
     }
   }
 
-  if (is_linux || is_chromeos) {
+  if (enable_screen_ai_service && (is_linux || is_chromeos || is_tizen)) {
     deps += [ "//services/screen_ai:screen_ai_sandbox_hook" ]
   }
 
index aeb937ddbceaf616574ba6038139af1ef4657132..46269a1310e35f85a336fafd61c0fa6981084b82 100644 (file)
@@ -537,7 +537,6 @@ touch ./tizen_src/downloadable/ewk_api_wrapper_generator.py
   "build_chrome=true" \
 %else
   "build_chrome=false" \
-  "ozone_auto_platforms=false" \
 %endif
 %if "%{?tizen_profile_name}" == "tv"
   "lib_dir_path=\"%{_libdir}\"" \
index 4574f9e76bdb623d2b48e4fae0f1d4f392bdc789..245ff1440d3695edf8c3ab56d8809ac729e58834 100644 (file)
@@ -31,8 +31,8 @@ source_set("screen_ai") {
   deps = [
     "//mojo/public/cpp/bindings",
     "//sandbox/policy",
-    "//services/metrics/public/cpp:ukm_builders",
     "//services/metrics/public/cpp:metrics_cpp",
+    "//services/metrics/public/cpp:ukm_builders",
     "//services/screen_ai/buildflags",
     "//services/screen_ai/proto",
     "//services/screen_ai/public/cpp:utilities",
@@ -45,7 +45,7 @@ source_set("screen_ai") {
   configs += [ "//build/config/compiler:wexit_time_destructors" ]
 }
 
-if (is_linux || is_chromeos) {
+if (is_linux || is_chromeos || is_tizen) {
   source_set("screen_ai_sandbox_hook") {
     sources = [
       "sandbox/screen_ai_sandbox_hook_linux.cc",
@@ -72,9 +72,7 @@ group("test_support_data") {
 
   data = [ "$root_gen_dir/services/screen_ai/proto/view_hierarchy.descriptor" ]
 
-  deps = [
-    "//services/screen_ai/proto:view_hierarchy_proto_descriptor",
-  ]
+  deps = [ "//services/screen_ai/proto:view_hierarchy_proto_descriptor" ]
 }
 
 source_set("unit_tests") {
@@ -98,9 +96,7 @@ source_set("unit_tests") {
     "//ui/accessibility:test_support",
   ]
 
-  data_deps = [
-    ":test_support_data",
-  ]
+  data_deps = [ ":test_support_data" ]
 }
 
 source_set("test_support") {
index a659c5d46b4cb98052abfde2e49f1ac248f2b1db..7a8a54bca391b65102c685e77eb95d78b88d477a 100644 (file)
@@ -7,7 +7,8 @@ import("//build/config/sanitizers/sanitizers.gni")
 
 declare_args() {
   # Screen AI service is only supported on desktop platforms.
-  enable_screen_ai_service = is_linux || is_mac || is_chromeos || is_win
+  enable_screen_ai_service =
+      is_linux || is_mac || is_chromeos || is_win || is_tizen
 
   # Screen AI library is not available for browser tests on ChromeOS. Tast tests
   # cover library's OCR functionality on ChromeOS.
index ec4f50e7cffa2c4b2ff5a60817a11a6957792d44..848368730a7764a099900097b7053ecf0f7ba627 100644 (file)
@@ -123,9 +123,3 @@ compile_suid_client = true
 compile_credentials = true
 
 edje_compiler = "edje_cc"
-
-if (use_ozone) {
-  # Declared from the //build/config/ui.gni
-  #use_glib = true
-  external_ozone_platforms = [ "efl" ]
-}
index 4dd81c69f3f1745ebac9a0f86dfa812150a4e6eb..54c10a79f6596aa0db87fb51ff67c08bd8bc81b1 100755 (executable)
@@ -205,6 +205,7 @@ add_tizen_flags() {
                              use_nss_certs=true
                              use_system_libwayland=true
                              v8_use_external_startup_data=true
+                             ozone_auto_platforms=false
                             "
 
   # FIXME : Note that the v8_snapshot_toolchain has been set to wrong
index d460dc3ee3d3c01bc213963b549efcc1cd2ebc86..b74ed5994c4cce43d98347c7ed5e697d3b2beb22 100644 (file)
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
 import("//build/config/chromeos/ui_mode.gni")
 import("//build/config/devtools.gni")
 import("//build/config/ui.gni")
+import("//tizen_src/build/config/tizen_features.gni")
 
 shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir)
 devtools_grd_path = "$shared_intermediate_dir/$devtools_grd_location"
@@ -34,6 +35,7 @@ _grit_defines = [
   "use_aura=${use_aura}",
   "use_ozone=${use_ozone}",
   "is_tizen=${is_tizen}",
+  "build_chrome=${build_chrome}",
 
   # Mac and iOS want Title Case strings.
   "use_titlecase=${is_apple}",