[M108 Migration][WRTjs] Use BUILDFLAG(IS_XXX) for OS checking 82/289482/2
authorzhaosy <shiyusy.zhao@samsung.com>
Thu, 9 Mar 2023 00:04:59 +0000 (08:04 +0800)
committerzhao shiyu <shiyusy.zhao@samsung.com>
Thu, 9 Mar 2023 08:11:24 +0000 (08:11 +0000)
This patch replaces all occurances of defined(OS_XXX) with
BUILDFLAG(IS_XXX) as per upstream changes mentioned in [1].

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1234043

Below efl/tizen build flags are replaced:

USE_EFL -> IS_EFL
OS_TIZEN -> IS_TIZEN
OS_TIZEN_TV_PRODUCT -> IS_TIZEN_TV

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

Change-Id: I387487f030919116dee9210261f23b215b6c4b60
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
content/common/zygote/zygote_communication_linux.cc
electron/shell/browser/api/electron_api_web_contents.cc
electron/shell/browser/electron_browser_main_parts.cc

index 9e2d158..f707c1b 100644 (file)
@@ -361,9 +361,7 @@ void ZygoteCommunication::DropProcessPrivileges(const std::string& app_id) {
 pid_t ZygoteCommunication::GetZygotePid() {
   return pid_;
 }
-#endif
 
-#if BUILDFLAG(IS_TIZEN_TV)
 void ZygoteCommunication::SetTimeZoneOffset(
     const std::string& time_zone_offset) {
   DCHECK(init_);
index 18cea53..c88f1ad 100644 (file)
@@ -3061,7 +3061,7 @@ void WebContents::Focus() {
   if (owner_window())
     owner_window()->Focus(true);
 #endif
-#if !defined(ENABLE_WRT_JS) || !defined(OS_TIZEN_TV_PRODUCT)
+#if !defined(ENABLE_WRT_JS) || !BUILDFLAG(IS_TIZEN_TV)
   web_contents()->Focus();
 #endif
 }
index 40c1830..023bdb0 100644 (file)
@@ -267,7 +267,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() {
 }
 
 void ElectronBrowserMainParts::PostEarlyInitialization() {
-#if defined(ENABLE_WRT_JS) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV)
   LOG(INFO) << "Start Electron PostEarlyInitialization";
 #endif
 
@@ -322,7 +322,7 @@ void ElectronBrowserMainParts::PostEarlyInitialization() {
   // Initialize after user script environment creation.
   fake_browser_process_->PostEarlyInitialization();
 
-#if defined(ENABLE_WRT_JS) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV)
   LOG(INFO) << "End Electron PostEarlyInitialization";
 #endif
 }