Use BUILDFLAG(IS_XXX) for OS checking. 02/290202/6
authorSun-woo Nam <sunny.nam@samsung.com>
Tue, 21 Mar 2023 09:10:01 +0000 (02:10 -0700)
committerBot Blink <blinkbot@samsung.com>
Wed, 22 Mar 2023 05:15:10 +0000 (05:15 +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 tizen build flags are replaced:

OS_TIZEN -> IS_TIZEN
OS_TIZEN_TV_PRODUCT -> IS_TIZEN_TV

Reference:
https://review.tizen.org/gerrit/#/c/289482/

Change-Id: I59e6c9081cf68b4f9f40a42850785167ab3549d4
Signed-off-by: Sun-woo Nam <sunny.nam@samsung.com>
31 files changed:
content/browser/web_contents/web_contents_impl.cc
content/browser/web_contents/web_contents_impl.h
content/public/renderer/content_renderer_client.cc
content/renderer/pepper/ppb_graphics_3d_impl.cc
content/renderer/render_frame_impl.cc
gpu/command_buffer/service/gles2_cmd_decoder.cc
media/base/video_types.h
ppapi/cpp/samsung/extension_system_samsung_tizen.cc
third_party/blink/renderer/platform/widget/widget_base.cc
tizen_src/chromium_impl/content/browser/renderer_host/pepper/pepper_remote_controller_host.cc
tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc
tizen_src/chromium_impl/media/base/tizen/video_plane_controller.cc
tizen_src/chromium_impl/media/base/tizen/video_plane_controller_capi.cc
tizen_src/chromium_impl/media/filters/esplusplayer_buffer_observer_impl.cc
tizen_src/chromium_impl/media/filters/media_capabilities.cc
tizen_src/chromium_impl/media/filters/media_capabilities.h
tizen_src/downloadable/ewk_interface_main.cc
tizen_src/ewk/efl_integration/common/trusted_pepper_plugin_util.cc
tizen_src/ewk/efl_integration/devtools_delegate_efl.cc
tizen_src/ewk/efl_integration/devtools_port_manager.cc
tizen_src/ewk/efl_integration/eweb_context.cc
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h
tizen_src/ewk/efl_integration/ewk_extension_system_delegate.cc
tizen_src/ewk/efl_integration/ewk_privilege_checker.cc
tizen_src/ewk/efl_integration/public/ewk_settings.cc
tizen_src/ewk/efl_integration/public/ewk_view.cc
tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_avplayer.h
tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_hole.h
tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc
tizen_src/ewk/efl_integration/web_contents_observer_efl.cc

index 1e39df3..6b0ee8b 100644 (file)
@@ -1903,7 +1903,7 @@ void WebContentsImpl::SetUserAgentOverride(
   // No need to reload if the current entry matches that of the
   // NavigationRequest supplied to DidStartNavigation() as NavigationRequest
   // handles it.
-#if defined(OS_TIZEN_TV_PRODUCT) && defined(ENABLE_WRT_JS)
+#if BUILDFLAG(IS_TIZEN_TV) && defined(ENABLE_WRT_JS)
   if (need_reload_by_ua_change_)
 #endif
   ForEachFrameTree(base::BindRepeating([](FrameTree* frame_tree) {
index 72a53a7..d6ccd66 100644 (file)
@@ -235,7 +235,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
   void SetAtkEnabled(bool enabled);
 #endif
 
-#if defined(OS_TIZEN_TV_PRODUCT) && defined(ENABLE_WRT_JS)
+#if BUILDFLAG(IS_TIZEN_TV) && defined(ENABLE_WRT_JS)
   void SetReloadByUserAgentChange(bool will_reload) {
     need_reload_by_ua_change_ = will_reload;
   }
@@ -2429,7 +2429,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
   bool spatial_navigation_enabled_ = false;
 #endif
 
-#if defined(OS_TIZEN_TV_PRODUCT) && defined(ENABLE_WRT_JS)
+#if BUILDFLAG(IS_TIZEN_TV) && defined(ENABLE_WRT_JS)
   bool need_reload_by_ua_change_ = true;
 #endif
 
index 631dd42..77adb7d 100644 (file)
@@ -14,7 +14,7 @@
 #include "ui/gfx/icc_profile.h"
 #include "url/gurl.h"
 
-#if defined(TIZEN_MULTIMEDIA) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(TIZEN_MULTIMEDIA) && BUILDFLAG(IS_TIZEN_TV)
 #include "content/public/renderer/render_frame.h"
 #include "media/base/media_url_demuxer.h"
 #include "third_party/blink/public/web/web_local_frame.h"
@@ -80,7 +80,7 @@ std::unique_ptr<media::Demuxer> ContentRendererClient::OverrideDemuxerForUrl(
     RenderFrame* render_frame,
     const GURL& url,
     scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
-#if defined(TIZEN_MULTIMEDIA) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(TIZEN_MULTIMEDIA) && BUILDFLAG(IS_TIZEN_TV)
   if (content::IsHbbTV()) {
     blink::WebLocalFrame* frame = render_frame->GetWebFrame();
     return std::make_unique<media::MediaUrlDemuxer>(
index bc189c9..5d12d42 100644 (file)
@@ -47,7 +47,7 @@ namespace content {
 
 namespace {
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 const int32_t kMaxTextureSamples = 4;
 #endif
 
@@ -256,7 +256,7 @@ bool PPB_Graphics3D_Impl::InitRaw(
   attrib_helper.should_use_native_gmb_for_backbuffer = use_image_chromium_;
   attrib_helper.context_type = gpu::CONTEXT_TYPE_OPENGLES2;
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   if (attrib_helper.samples > 1 && attrib_helper.sample_buffers > 1) {
     attrib_helper.samples = std::min(attrib_helper.samples, kMaxTextureSamples);
   }
index 7be59b4..d95e1b7 100644 (file)
 #include "content/renderer/java/gin_java_bridge_dispatcher.h"
 #endif
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #if defined(ENABLE_WRT_JS)
 #include "third_party/blink/public/platform/web_application_type.h"
 #endif
@@ -2920,7 +2920,7 @@ void RenderFrameImpl::CommitFailedNavigation(
   navigation_params->http_method = WebString::FromASCII(common_params->method);
   navigation_params->error_code = error_code;
 
-#if defined(ENABLE_WRT_JS) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(ENABLE_WRT_JS) && BUILDFLAG(IS_TIZEN_TV)
   if (blink::IsTIZENWRT())
     navigation_params->grant_load_local_resources = true;
 #endif
index 649de43..0de74f1 100644 (file)
@@ -550,13 +550,13 @@ class BackFramebuffer {
 
   gl::GLApi* api() const;
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   void SetTextureSamples(GLsizei samples) { texture_samples_ = samples; }
 #endif
 
  private:
   raw_ptr<GLES2DecoderImpl> decoder_;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   GLsizei texture_samples_;
 #endif
   GLuint id_;
@@ -2598,7 +2598,7 @@ class GLES2DecoderImpl : public GLES2Decoder,
   GLenum offscreen_target_depth_format_;
   GLenum offscreen_target_stencil_format_;
   GLsizei offscreen_target_samples_;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   GLsizei offscreen_texture_samples_;
 #endif
   GLboolean offscreen_target_buffer_preserved_;
@@ -3363,7 +3363,7 @@ void BackRenderbuffer::Invalidate() {
 
 BackFramebuffer::BackFramebuffer(GLES2DecoderImpl* decoder)
     : decoder_(decoder),
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
       texture_samples_(0),
 #endif
       id_(0) {
@@ -3393,7 +3393,7 @@ void BackFramebuffer::AttachRenderTexture(BackTexture* texture) {
                                      decoder_->error_state_.get());
   ScopedFramebufferBinder binder(decoder_, id_);
   GLuint attach_id = texture ? texture->id() : 0;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   if (texture_samples_ > 1) {
     glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                          GL_TEXTURE_2D, attach_id, 0,
@@ -3473,7 +3473,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(
       offscreen_target_depth_format_(0),
       offscreen_target_stencil_format_(0),
       offscreen_target_samples_(0),
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
       offscreen_texture_samples_(0),
 #endif
       offscreen_target_buffer_preserved_(true),
@@ -3820,7 +3820,7 @@ gpu::ContextResult GLES2DecoderImpl::Initialize(
       // ANGLE only supports packed depth/stencil formats, so use it if it is
       // available.
       const bool depth24_stencil8_supported =
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
           offscreen_texture_samples_ <= 1 &&
 #endif
           feature_info_->feature_flags().packed_depth24_stencil8;
@@ -3992,7 +3992,7 @@ gpu::ContextResult GLES2DecoderImpl::Initialize(
     // Create the target frame buffer. This is the one that the client renders
     // directly to.
     offscreen_target_frame_buffer_ = std::make_unique<BackFramebuffer>(this);
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
     offscreen_target_frame_buffer_->SetTextureSamples(
         offscreen_texture_samples_);
 #endif
@@ -4020,7 +4020,7 @@ gpu::ContextResult GLES2DecoderImpl::Initialize(
       // Create the saved offscreen texture. The target frame buffer is copied
       // here when SwapBuffers is called.
       offscreen_saved_frame_buffer_ = std::make_unique<BackFramebuffer>(this);
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
       offscreen_saved_frame_buffer_->SetTextureSamples(
           offscreen_texture_samples_);
 #endif
@@ -5802,7 +5802,7 @@ bool GLES2DecoderImpl::ResizeOffscreenFramebuffer(const gfx::Size& size) {
     }
   }
   int32_t target_samples = offscreen_target_samples_;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   if (target_samples == 1 && offscreen_texture_samples_ > 1)
     target_samples = offscreen_texture_samples_;
 #endif
index c6b3709..461406d 100644 (file)
@@ -102,7 +102,7 @@ enum VideoPixelFormat {
 #else
   PIXEL_FORMAT_MAX =
       PIXEL_FORMAT_YUV444AP10,  // Must always be equal to largest entry logged.
-#endif  // defined(OS_TIZEN)
+#endif  // BUILDFLAG(IS_TIZEN)
 };
 
 // These values are persisted to logs. Entries should not be renumbered and
index 5bdd609..efb59f5 100644 (file)
@@ -7,7 +7,7 @@
 namespace {
 const char kCheckPrivilegeOperationName[] = "check_ace_privilege";
 const char kGetWindowIdOperationName[] = "get_window_id";
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 const char kSetIMERecommendedWordsName[] = "set_ime_recommended_words";
 const char kSetIMERecommendedWordsTypeName[] = "set_ime_recommended_words_type";
 #endif
@@ -36,7 +36,7 @@ bool ExtensionSystemSamsungTizen::CheckPrivilege(const Var& privilege) {
   return has_privilege;
 }
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 bool ExtensionSystemSamsungTizen::SetIMERecommendedWords(const Var& words) {
   Var call_result = GenericSyncCall(kSetIMERecommendedWordsName, words);
   if (call_result.is_bool())
index 984e78a..8c2556c 100644 (file)
@@ -1214,7 +1214,7 @@ void WidgetBase::ShowVirtualKeyboardOnElementFocus() {
     DidUpdateTextOfFocusedElementByNonUserInput();
 #else
     ShowVirtualKeyboard();
-#endif  // endif defined(OS_TIZEN_TV_PRODUCT)
+#endif  // BUILDFLAG(IS_TIZEN_TV)
   }
 
 #else
index a44fbc8..ba6fa67 100644 (file)
@@ -15,7 +15,7 @@
 #include "ppapi/proxy/dispatch_reply_message.h"
 #include "ppapi/proxy/ppapi_messages.h"
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #include "content/browser/renderer_host/pepper/remote_controller_wrt.h"
 #include "ewk/efl_integration/common/application_type.h"
 #endif
@@ -99,7 +99,7 @@ PepperRemoteControllerHost::GetPlatformDelegate() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (delegate_)
     return delegate_.get();
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   if (IsTIZENWRT())
     delegate_ = CreateRemoteControllerWRT(pp_instance(), host_);
 #endif
index 2d3d543..f5e0fd3 100644 (file)
@@ -62,7 +62,7 @@ void FormNavigablePicker::UnregisterCallbacks() {
                                   ListClosedCallback);
   edje_object_signal_callback_del(edje_obj, kMouseClicked1, kDimmObj,
                                   ListClosedCallback);
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
   eext_object_event_callback_del(layout_, EEXT_CALLBACK_BACK,
                                  HWBackKeyCallback);
 #endif
index 8fc2e15..20b915f 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "media/base/tizen/video_plane_controller.h"
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #include "ui/display/device_display_info_efl.h"
 #endif
 
index ec0a699..69ba428 100644 (file)
@@ -11,7 +11,7 @@
 #include "ui/display/display.h"
 #include "ui/display/screen.h"
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #include <player_product.h>
 #endif
 
@@ -24,7 +24,7 @@ VideoPlaneControllerCapi::~VideoPlaneControllerCapi() {}
 
 int VideoPlaneControllerCapi::Initialize() {
   int ret = PLAYER_ERROR_NONE;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   ret = player_set_display_mode(player_handle_, PLAYER_DISPLAY_MODE_DST_ROI);
 
   if (ret != PLAYER_ERROR_NONE)
@@ -40,7 +40,7 @@ int VideoPlaneControllerCapi::Initialize() {
 
 int VideoPlaneControllerCapi::SetVideoRect(const gfx::RectF& rect) {
   int ret = PLAYER_ERROR_NONE;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   ret = player_set_display_roi_area(player_handle_, rect.x(), rect.y(),
                                     rect.width(), rect.height());
 #endif
@@ -49,7 +49,7 @@ int VideoPlaneControllerCapi::SetVideoRect(const gfx::RectF& rect) {
 
 int VideoPlaneControllerCapi::PlayerSetCropRatio(const gfx::RectF& rect) {
   int ret = PLAYER_ERROR_NONE;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   LOG(INFO) << "crop_ratio : (" << rect.x() << ", " << rect.y() << ", "
             << rect.width() << ", " << rect.height() << ")";
 
@@ -93,7 +93,7 @@ void VideoPlaneControllerCapi::SetDisplayRotation() {
 player_display_rotation_e
 VideoPlaneControllerCapi::ConvertToPlayerDisplayRotation(int rotation) {
   switch (rotation) {
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
     case 90:
       return PLAYER_DISPLAY_ROTATION_270;
     case 180:
index 1a8e21a..804d93a 100644 (file)
@@ -82,7 +82,7 @@ void BufferObserverImpl::UpdateBufferedSize(DemuxerStream::Type type,
               << GetBuffer(DemuxerStream::VIDEO).buffer_percent << "%"
               << "\tAUDIO: " << GetBuffer(DemuxerStream::AUDIO).buffer_percent
               << "%";
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   // The buffer is controlled in time domain, however we want to stop
   // pushing data in case of size overflow as well
   buffer.has_size_overflow = (buffer_status == kBufferOverflow);
@@ -265,7 +265,7 @@ int BufferObserverImpl::SetBufferStatusCallbacks(
   }
 
   // FIXME: TM1 is giving wrong time size for pipeline.
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   if ((ret = esplusplayer_set_buffer_time_status_cb(
            player, callbacks.time_status_cb, this)) !=
       ESPLUSPLAYER_ERROR_TYPE_NONE) {
index 4694009..4cb98c7 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "media/filters/media_capabilities.h"
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #include <capi-system-info/system_info.h>
 
 #include "base/command_line.h"
@@ -19,7 +19,7 @@ namespace platform {
 
 namespace {
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 bool IsCameraHardwareEncoderEnabled() {
 #if !defined(EWK_BRINGUP)  // Fixme: Remove after Port Video Encoders Patch is merged
 //  const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
@@ -47,7 +47,7 @@ std::size_t TVMaxCount(MediaType type) {
 #if defined(TIZEN_VD_MULTIPLE_MIXERDECODER)
   if ((MediaType::Video == type) && content::IsTIZENWRT())
     return 3;
-#elif defined(OS_TIZEN_TV_PRODUCT)
+#elif BUILDFLAG(IS_TIZEN_TV)
   if (MediaType::Video == type) {
     if (
 #if !defined(EWK_BRINGUP)  // Fixme: Remove after HDR and codec related patch is merged
index 269e007..dc16a2a 100644 (file)
@@ -550,7 +550,7 @@ using DACapabilitiesSetup = BasicAVCapabilitiesSetup<20, 2>;
 using TVCapabilitiesSetup =
     RuntimeAVCapabilitiesSetup<TVAudioCapabilities, TVVideoCapabilities>;
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 using DefaultCapabilitiesSetup = TVCapabilitiesSetup;
 #elif defined(OS_TIZEN_DA_PRODUCT)
 using DefaultCapabilitiesSetup = DACapabilitiesSetup;
index 9643b64..484bfe8 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "ewk_interface_main.h"
 
+#include "build/build_config.h"
+
 #define TIZEN_VERSION                                        \
   (TIZEN_VERSION_MAJOR * 10000 + TIZEN_VERSION_MINOR * 100 + \
    TIZEN_VERSION_PATCH)
@@ -11,7 +13,7 @@
   (TIZEN_VERSION >= (major * 10000 + minor * 100 + patch))
 
 #define CHROMIUM_PRELOAD_LIB_PATH LIB_RO_ROOT_DIR "/lib/" CHROMIUM_IMPL_LIB_FILE
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #define PATH_PRELOAD_CHROMIUM_EFL_IMG APP_RO_ROOT_DIR "/res/chromium-efl.img"
 #define MOUNT_ARGS_PRELOAD_CHROMIUM \
   PATH_PRELOAD_CHROMIUM_EFL_IMG " " LIB_RO_ROOT_DIR " -t squashfs -o loop,ro"
@@ -23,7 +25,7 @@
 #include <ttrace.h>
 
 #include <sys/resource.h>
-#endif
+#endif  // BUILDFLAG(IS_TIZEN_TV)
 
 #include <EWebKit.h>
 #include <EWebKit_internal.h>
@@ -45,7 +47,7 @@ inline unsigned long long ConvertMilliseconds(timespec ts) {
   return ((unsigned long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
 }
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 bool g_upgrade_lib = false;  // conservative policy
 const char* kChromiumMountReady = "/tmp/.chromium_mount.ready";
 const char* kUWETag = "USE_UWE";
@@ -121,13 +123,13 @@ void SetPriority(int absolute) {
   LOG(INFO) << "Set process priority : " << absolute;
 }
 #endif  // TIZEN_VERSION_AT_LEAST(7, 0, 0)
-#endif  // OS_TIZEN_TV_PRODUCT
+#endif  // BUILDFLAG(IS_TIZEN_TV)
 
 void* open_library() {
   if (g_impl_lib_handle)
     return g_impl_lib_handle;
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   g_upgrade_lib = (g_upgrade_lib && !access(CHROMIUM_UPGRADE_LIB_PATH, F_OK));
   const char* path =
       g_upgrade_lib ? CHROMIUM_UPGRADE_LIB_PATH : CHROMIUM_PRELOAD_LIB_PATH;
@@ -191,7 +193,7 @@ void* ewk_dlsym(const char* function_name) {
 }
 
 Eina_Bool ewk_wait_chromium_ready(unsigned int timeout_msec) {
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   LOG(INFO) << "ewk_wait_chromium_ready called. timeout : " << timeout_msec;
 
   int ret = LwipcWaitEvent(kChromiumMountReady, timeout_msec);
@@ -208,7 +210,7 @@ Eina_Bool ewk_wait_chromium_ready(unsigned int timeout_msec) {
 }
 
 Eina_Bool ewk_check_chromium_ready() {
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   LOG(INFO) << "ewk_check_chromium_ready called.";
 
   if (LwipcIsDone(kChromiumMountReady) > 0) {
@@ -223,7 +225,7 @@ Eina_Bool ewk_check_chromium_ready() {
 }
 
 int ewk_set_version_policy(int preference) {
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   int ret = preference;
   if (0 == preference)
     g_upgrade_lib = false;  // conservative
@@ -280,7 +282,7 @@ __attribute__((visibility("default"))) int efl_webprocess_main(
     const char** argv) {
   LOG(INFO) << "EWK-INTERFACE : efl_webprocess_main called..";
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   if (!g_impl_lib_handle && !access(CHROMIUM_UPGRADE_LIB_PATH, F_OK)) {
     // If library is not loaded and upgrade package is installed,
     // we need to decide upgrade library by command line flag --impl-library
@@ -307,7 +309,7 @@ __attribute__((visibility("default"))) int efl_webprocess_main(
 __attribute__((visibility("default"))) int WRTMain(int argc, char** argv) {
   LOG(INFO) << "EWK-INTERFACE : WRTMain called..";
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #if TIZEN_VERSION_AT_LEAST(7, 0, 0)
   if (!ewk_check_chromium_ready())
     SetPriority(-20);
index dd9ed5f..2ced90a 100644 (file)
@@ -50,7 +50,7 @@ void UpdatePluginRegistry() {
 bool AreTrustedPepperPluginsDisabled() {
   auto command_line = base::CommandLine::ForCurrentProcess();
   return
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
       content::IsWebBrowser() &&
 #endif
       !command_line->HasSwitch(switches::kEnableTrustedPepperPlugins);
index dc20abd..339cfee 100644 (file)
@@ -62,7 +62,7 @@ bool DevToolsDelegateEfl::HasBundledFrontendResources() {
   return true;
 }
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 void DevToolsDelegateEfl::ReleasePort() {
   content::DevToolsUtilManager::GetInstance()->ReleasePort();
 }
index 4f35dba..c88785b 100644 (file)
@@ -10,7 +10,7 @@
 #include <unistd.h>
 #include "base/logging.h"
 #include "devtools_port_msg.h"
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
 #include <vconf/vconf.h>
 #endif
 namespace devtools_http_handler {
@@ -234,7 +234,7 @@ void DevToolsPortManager::GetMappingInfo(std::string& usedMappingInfo) {
 bool DevToolsPortManager::ProcessCompare() {
   std::string processName = GetCurrentProcessName();
 
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
   char* vconfWidgetName = vconf_get_str("db/rwi/inspected_appid");
 #else
   char* vconfWidgetName = NULL;
index 0d9f7a7..9a36bc6 100644 (file)
@@ -293,7 +293,7 @@ bool EWebContext::SetAppVersion(const std::string& tizen_app_version) {
   command_line.AppendSwitchASCII(switches::kTizenAppVersion, tizen_app_version);
   return true;
 #else
-  LOG(WARNING) << "OS_TIZEN is not enabled.";
+  LOG(WARNING) << "IS_TIZEN is not enabled.";
   return false;
 #endif  // IS_TIZEN
 }
index 4f64fea..61e654b 100644 (file)
 #include "devtools_port_manager.h"
 #include "public/ewk_media_downloadable_font_info.h"
 #include "browser/mixed_content_observer.h"
-#endif // OS_TIZEN_TV_PRODUCT
+#endif
 
 #if defined(TIZEN_PEPPER_EXTENSIONS)
 #include "efl/window_factory.h"
index 74052ce..1a8a6b0 100644 (file)
@@ -722,6 +722,13 @@ class EWebView {
   void ClearLabels();
   void AddDynamicCertificatePath(const std::string& host,
                                  const std::string& cert_path);
+
+  bool SetMixedContents(bool allow);
+  void ClearAllTilesResources();
+  bool UseEarlyRWI() { return use_early_rwi_; }
+  bool RWIInfoShowed() { return rwi_info_showed_; }
+  GURL RWIURL() { return rwi_gurl_; }
+  void OnDialogClosed();
 #endif  // IS_TIZEN_TV
 
   void SetDidChangeThemeColorCallback(
@@ -731,15 +738,6 @@ class EWebView {
 
   void OnSelectionRectReceived(const gfx::Rect& selection_rect) const;
 
-#if BUILDFLAG(IS_TIZEN_TV)
-  bool SetMixedContents(bool allow);
-  void ClearAllTilesResources();
-  bool UseEarlyRWI() { return use_early_rwi_; }
-  bool RWIInfoShowed() { return rwi_info_showed_; }
-  GURL RWIURL() { return rwi_gurl_; }
-  void OnDialogClosed();
-#endif // OS_TIZEN_TV_PRODUCT
-
  private:
   static void NativeViewResize(void* data,
                                Evas* e,
@@ -758,6 +756,8 @@ class EWebView {
 
 #if BUILDFLAG(IS_TIZEN_TV)
   void InitInspectorServer();
+
+  void RunPendingSetFocus(Eina_Bool focus);
 #endif
 
 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
@@ -765,11 +765,10 @@ class EWebView {
                              service_h reply,
                              service_result_e result,
                              void* data);
-#endif
 
-#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
   bool LaunchCamera(std::u16string mimetype);
 #endif
+
   JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
 
   // Changes viewport without resizing Evas_Object representing webview
@@ -808,9 +807,6 @@ class EWebView {
   void UpdateContextMenuWithParams(const content::ContextMenuParams& params);
 
   static Eina_Bool DelayedPopulateAndShowContextMenu(void* data);
-#if BUILDFLAG(IS_TIZEN_TV)
-  void RunPendingSetFocus(Eina_Bool focus);
-#endif
 
   scoped_refptr<WebViewEvasEventHandler> evas_event_handler_;
   scoped_refptr<Ewk_Context> context_;
@@ -913,14 +909,12 @@ class EWebView {
       exceeded_indexed_db_quota_callback_;
   std::unique_ptr<Ewk_Security_Origin> exceeded_indexed_db_quota_origin_;
 
-#if BUILDFLAG(IS_TIZEN)
-  blink::mojom::FileChooserParams::Mode filechooser_mode_;
-#endif
   std::map<const _Ewk_Quota_Permission_Request*,
            content::QuotaPermissionContext::PermissionCallback>
       quota_permission_request_map_;
 
 #if BUILDFLAG(IS_TIZEN)
+  blink::mojom::FileChooserParams::Mode filechooser_mode_;
   Ecore_Event_Handler* window_rotate_handler_ = nullptr;
 #endif
 
@@ -930,6 +924,8 @@ class EWebView {
   bool use_early_rwi_;
   bool rwi_info_showed_;
   GURL rwi_gurl_;
+
+  base::OnceClosure pending_setfocus_closure_;
 #endif
 
   std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;
@@ -937,7 +933,6 @@ class EWebView {
   static content::WebContentsEflDelegate::WebContentsCreateCallback
       create_new_window_web_contents_cb_;
 
- private:
 #if defined(TIZEN_VIDEO_HOLE)
   void EnableVideoHoleSupportInternal();
 #endif
@@ -969,10 +964,6 @@ class EWebView {
 #endif
 
   Ecore_Timer* delayed_show_context_menu_timer_ = nullptr;
-
-#if BUILDFLAG(IS_TIZEN_TV)
-  base::OnceClosure pending_setfocus_closure_;
-#endif
 };
 
 const unsigned int g_default_tilt_motion_sensitivity = 3;
index fdd08f6..f5fae93 100644 (file)
@@ -11,7 +11,7 @@
 #include "ppapi/cpp/samsung/extension_system_samsung_wrt.h"
 #include "private/ewk_value_private.h"
 
-#if defined(OS_TIZEN_TV_PRODUCT) && defined(USE_WAYLAND)
+#if BUILDFLAG(IS_TIZEN_TV) && defined(USE_WAYLAND)
 #include <Ecore_Evas.h>
 #if TIZEN_VERSION_AT_LEAST(5, 0, 0)
 #include <Ecore_Wl2.h>
@@ -19,7 +19,7 @@
 #include <Ecore_Wayland.h>
 #endif
 #include <tizen-extension-client-protocol.h>
-#endif  // defined(OS_TIZEN_TV_PRODUCT) && defined(USE_WAYLAND)
+#endif  // BUILDFLAG(IS_TIZEN_TV) && defined(USE_WAYLAND)
 
 namespace {
 static const char kTypeWebBrowserName[] = "WebBrowser";
@@ -30,7 +30,7 @@ static const char kTypeUnrecognized[] = "UnrecognizedEmbedder";
 static base::LazyInstance<std::string>::Leaky current_embedder_name =
     LAZY_INSTANCE_INITIALIZER;
 
-#if defined(OS_TIZEN_TV_PRODUCT) && defined(USE_WAYLAND)
+#if BUILDFLAG(IS_TIZEN_TV) && defined(USE_WAYLAND)
 
 struct WLRegistryDestroy {
   void operator()(void* x) const {
@@ -152,7 +152,7 @@ int GetWaylandWindowId(Ecore_Wl_Window* ew) {
 }
 #endif  // TIZEN_VERSION_AT_LEAST(5, 0, 0)
 
-#endif  // defined(OS_TIZEN_TV_PRODUCT) && defined(USE_WAYLAND)
+#endif  // BUILDFLAG(IS_TIZEN_TV) && defined(USE_WAYLAND)
 
 }  // namespace
 
@@ -237,7 +237,7 @@ void EwkExtensionSystemDelegate::SetGenericSyncCallback(
 }
 
 void EwkExtensionSystemDelegate::SetWindowId(const Evas_Object* main_window) {
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   Evas* evas = evas_object_evas_get(main_window);
   if (!evas) {
     LOG(ERROR) << "Evas can`t be acquired for main window";
@@ -263,5 +263,5 @@ void EwkExtensionSystemDelegate::SetWindowId(const Evas_Object* main_window) {
   Ecore_X_Window ww = ecore_evas_gl_x11_window_get(ee);
   window_id_ = static_cast<int>(ww);
 #endif  // defined(USE_WAYLAND)
-#endif  // defined(OS_TIZEN_TV_PRODUCT)
+#endif  // BUILDFLAG(IS_TIZEN_TV)
 }
index 2db385f..60524eb 100644 (file)
@@ -4,12 +4,12 @@
 
 #include "ewk/efl_integration/ewk_privilege_checker.h"
 
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
 #include <app_manager.h>
 #include <cynara-client.h>
 #include <pkgmgr-info.h>
 #include <unistd.h>
-#endif  // defined(OS_TIZEN)
+#endif  // BUILDFLAG(IS_TIZEN)
 
 #include <fstream>
 #include <memory>
@@ -19,7 +19,7 @@
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
 namespace {
 bool GetPkgApiVersion(std::string* api_version) {
   char* app_id = nullptr;
@@ -69,7 +69,7 @@ bool GetPkgApiVersion(std::string* api_version) {
 }
 
 }  // namespace
-#endif  // defined(OS_TIZEN)
+#endif  // BUILDFLAG(IS_TIZEN)
 
 namespace content {
 
@@ -79,7 +79,7 @@ EwkPrivilegeChecker* EwkPrivilegeChecker::GetInstance() {
 }
 
 bool EwkPrivilegeChecker::CheckPrivilege(const std::string& privilege_name) {
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
   static constexpr char kSmackLabelFilePath[] = "/proc/self/attr/current";
 
   int ret;
@@ -123,7 +123,7 @@ bool EwkPrivilegeChecker::CheckPrivilege(const std::string& privilege_name) {
     return false;
   }
   return true;
-#else  // defined(OS_TIZEN)
+#else  // BUILDFLAG(IS_TIZEN)
   ALLOW_UNUSED_LOCAL(privilege_name);
   return false;
 #endif
index 4f2d63d..36284d3 100644 (file)
@@ -848,7 +848,7 @@ Eina_Bool ewk_settings_viewport_meta_tag_get(const Ewk_Settings *settings)
 
 void ewk_settings_spatial_navigation_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
 {
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   EINA_SAFETY_ON_NULL_RETURN(settings);
   LOG(INFO)<<"ewk_settings_spatial_navigation_enabled_set, enabled: " <<(bool)enable;
   settings->getPreferences().spatial_navigation_enabled = !!enable;
index b6d12cc..f699d14 100644 (file)
@@ -1576,7 +1576,7 @@ Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView,
 void ewk_view_set_cursor_by_client(Evas_Object* ewkView, Eina_Bool enable) {}
 
 void ewk_view_widget_pepper_extension_callback_set(Evas_Object* ewk_view, Generic_Sync_Call_Callback cb, void* user_data) {
-#if defined(TIZEN_PEPPER_EXTENSIONS) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(TIZEN_PEPPER_EXTENSIONS) && BUILDFLAG(IS_TIZEN_TV)
   EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl);
   impl->SetPepperExtensionCallback(cb, user_data);
 #else
@@ -1586,7 +1586,7 @@ void ewk_view_widget_pepper_extension_callback_set(Evas_Object* ewk_view, Generi
 }
 
 void ewk_view_widget_pepper_extension_info_set(Evas_Object* ewk_view, Ewk_Value widget_pepper_ext_info) {
-#if defined(TIZEN_PEPPER_EXTENSIONS) && defined(OS_TIZEN_TV_PRODUCT)
+#if defined(TIZEN_PEPPER_EXTENSIONS) && BUILDFLAG(IS_TIZEN_TV)
   EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl);
   impl->SetPepperExtensionWidgetInfo(widget_pepper_ext_info);
 #else
index 7f881a7..a2c014b 100644 (file)
@@ -38,7 +38,7 @@ class PluginPlaceholderAvplayer
 
   // WebViewPlugin::Delegate method.
   v8::Local<v8::Value> GetV8Handle(v8::Isolate*) override;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   bool PluginIsAvplayer() override { return true; }
 #endif
   void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override;
index 6596be9..3d5acf9 100644 (file)
@@ -42,7 +42,7 @@ class PluginPlaceholderHole : public plugins::PluginPlaceholderBase,
   v8::Local<v8::Value> GetV8Handle(v8::Isolate*) override;
   v8::Local<v8::Object> GetV8ScriptableObject(
       v8::Isolate* isolate) const override;
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
   bool PluginIsAvplayer() { return false; }
 #endif
   void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override;
index 99f1772..19a2a08 100644 (file)
 #include <app_manager.h>
 #endif
 
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "browser/mixed_content_observer.h"
+#include "devtools_port_manager.h"
+#endif
+
 #if defined(TIZEN_MULTIMEDIA)
 #include "base/functional/callback.h"
 #include "content/public/browser/media_capture_devices.h"
 #include "browser/autofill/autofill_request_manager.h"
 #endif
 
-#if BUILDFLAG(IS_TIZEN_TV)
-#include "devtools_port_manager.h"
-#endif // OS_TIZEN_TV_PRODUCT
-
 #if defined(TIZEN_AUTOFILL)
 #include "base/command_line.h"
 #include "browser/autofill/autofill_client_efl.h"
@@ -77,9 +78,6 @@ using autofill::AutofillClientEfl;
 using autofill::ContentAutofillDriverFactory;
 using password_manager::PasswordManagerClientEfl;
 #endif
-#if BUILDFLAG(IS_TIZEN_TV)
-#include "browser/mixed_content_observer.h"
-#endif
 using std::u16string;
 using namespace ui;
 
index 8768401..f510534 100644 (file)
@@ -29,7 +29,7 @@
 #include "ui/gfx/geometry/size.h"
 #include "url/gurl.h"
 
-#if defined(OS_TIZEN_TV_PRODUCT)
+#if BUILDFLAG(IS_TIZEN_TV)
 #include "private/ewk_context_private.h"
 #endif