[M126][TV][Offscreen] Fix build errors for tizen tv profile 86/316486/8
authornishitha <n.saravanan@samsung.com>
Fri, 23 Aug 2024 10:12:00 +0000 (15:42 +0530)
committernishitha <n.saravanan@samsung.com>
Mon, 26 Aug 2024 10:24:25 +0000 (15:54 +0530)
This commit fixes all gn related, compilation and linker errors
for tizen tv build.

Basic rendering works fine and google.com loads as expected on TV.

Change-Id: I192fdd92cfdceeec93edeb9f92e92da31bbef65d
Signed-off-by: nishitha <n.saravanan@samsung.com>
20 files changed:
components/autofill/content/renderer/autofill_agent.cc
components/autofill/content/renderer/password_autofill_agent.cc
components/autofill/content/renderer/password_form_conversion_utils.cc
components/password_manager/core/browser/password_manager.cc
content/browser/renderer_host/media/media_stream_manager.h
media/base/decoder_buffer.cc
media/base/video_codecs.h
media/filters/source_buffer_range.cc
media/formats/mp4/box_definitions.cc
packaging/chromium-efl.spec
third_party/blink/renderer/core/loader/frame_loader.cc
tizen_src/build/BUILD.gn
tizen_src/chromium_impl/media/filters/ieme_drm_bridge.cc
tizen_src/chromium_impl/media/filters/media_player_esplusplayer_tv.cc
tizen_src/ewk/efl_integration/BUILD.gn
tizen_src/ewk/efl_integration/content_browser_client_efl.cc
tizen_src/ewk/efl_integration/content_main_delegate_efl.cc
tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc
tizen_src/ewk/efl_integration/renderer/key_systems_tizen.cc
url/url_constants.h

index 667c068f3e0f39b323240521a981df9c4e25b73f..38c9e202babc5af8e20529f54698ab2bbafbfebd 100644 (file)
@@ -1721,7 +1721,7 @@ void AutofillAgent::JavaScriptChangedValue(WebFormControlElement element,
 
 #if defined(TIZEN_AUTOFILL_FW)
 void AutofillAgent::ForceResetLastInteractedElements() {
-  form_tracker_.ForceResetLastInteractedElements();
+  form_tracker_->ForceResetLastInteractedElements();
 }
 #endif
 
index 562a7ebb7f1760568c3a66f58a57bbfc4989d50c..80db91bb589903c73492c3b3f78ea583193a5e1c 100644 (file)
@@ -1954,7 +1954,7 @@ bool PasswordAutofillAgent::FillUserNameAndPassword(
          prefilled_placeholder_username)) {
 #if defined(TIZEN_AUTOFILL_FW)
       // We fill username and password directly
-      FillField(&username_element, username);
+      FillField(GetFieldRendererId(username_element), username);
     }
 #else
       AutofillField(username, username_element);
@@ -1971,7 +1971,7 @@ bool PasswordAutofillAgent::FillUserNameAndPassword(
 
   if (!is_single_username_fill) {
 #if defined(TIZEN_AUTOFILL_FW)
-    FillPasswordFieldAndSave(&password_element, password);
+    FillPasswordFieldAndSave(password_element, password);
 #else
     AutofillField(password, password_element);
 #endif
index 7b947848d07bb6a1ee550c0c720058f9e4822da9..d9f439c4d3f56a11b39b457832cdc9065195598e 100644 (file)
@@ -123,7 +123,7 @@ bool IsGaiaWithSkipSavePasswordForm(const blink::WebFormElement& form) {
 // Returns the PasswordContents reflecting the contents of |fields|.
 bool HasPasswordContents(const std::vector<FormFieldData>& fields) {
   for (const FormFieldData& field : fields) {
-    if (field.form_control_type == FormControlType::kInputPassword) {
+    if (field.form_control_type() == FormControlType::kInputPassword) {
       return true;
     }
   }
index 1f28faac1197b41d7f9c86d59849443b822af2b3..5732834d198bfd38f67c3ff19a5d1df02598d01e 100644 (file)
@@ -1317,9 +1317,9 @@ void PasswordManager::OnLoginSuccessful() {
   FormData form = submitted_manager->GetSubmittedForm()->form_data;
 
   for (size_t i = 0; i < form.fields.size(); i++) {
-    if (form.fields[i].is_autofilled) {
+    if (form.fields[i].is_autofilled()) {
       LOG(ERROR) << "[Autofill] " << __FUNCTION__ << "\t label : "
-                 << base::UTF16ToUTF8(form.fields[i].label).c_str();
+                 << base::UTF16ToUTF8(form.fields[i].label()).c_str();
       LOG(ERROR) << "[Autofill] " << __FUNCTION__
                  << " is_autofilled! do not send commit request";
 
index 99efcdac1e294961c37b53b219da0cb7dc73b8b2..9b69a0f3817e3b4546aa41fa5c1c417d87e91083 100644 (file)
@@ -859,6 +859,10 @@ class CONTENT_EXPORT MediaStreamManager
 #if BUILDFLAG(IS_CHROMEOS_ASH)
   std::unique_ptr<media::SystemEventMonitorImpl> system_event_monitor_;
 #endif
+
+#if BUILDFLAG(IS_TIZEN_TV)
+  GlobalRenderFrameHostId render_frame_host_id_;
+#endif
 };
 
 }  // namespace content
index e814248d9f836488ce432577add718634329fce1..aaa44bff9a8a6132b5a6481302670850c96e9838 100644 (file)
@@ -217,7 +217,7 @@ void DecoderBuffer::set_timestamp(base::TimeDelta timestamp) {
 #if BUILDFLAG(IS_TIZEN_TV)
 scoped_refptr<DecoderBuffer> DecoderBuffer::CreateTzHandleBuffer(int handle,
                                                                  int size) {
-  auto ptr = scoped_refptr<DecoderBuffer>(new DecoderBuffer(NULL, 0));
+  auto ptr = scoped_refptr<DecoderBuffer>(new DecoderBuffer(0));
   ptr->tz_handle_ = handle;
   ptr->tz_buffer_size_ = size;
   LOG(INFO) << __func__ << "tz_handle : " << handle
index ff813a2f6a2d626c0b943ca4173f8f9e9ea24768..e76ad552abd0fc41cfc83302d373ef2e54f80764 100644 (file)
@@ -153,7 +153,7 @@ VideoCodecProfileToVideoCodec(VideoCodecProfile profile);
 // Translate legacy avc1 codec ids (like avc1.66.30 or avc1.77.31) into a new
 // style standard avc1 codec ids like avc1.4D002F. If the input codec is not
 // recognized as a legacy codec id, then returns the input string unchanged.
-std::string TranslateLegacyAvc1CodecIds(base::StringPiece codec_id);
+std::string TranslateLegacyAvc1CodecIds(std::string_view codec_id);
 #endif
 
 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os,
index d661638c50c77a44edda9488901240b4118a7485..f6c307f0230ad6649c36f2ed050b21cf7c42d2f0 100644 (file)
@@ -194,7 +194,7 @@ void SourceBufferRange::ModifyFirstFrameForMpeghCodec() {
     return;
 
   auto old_data_ = buffers_[next_buffer_index_]->data();
-  auto old_data_size = buffers_[next_buffer_index_]->data_size();
+  auto old_data_size = buffers_[next_buffer_index_]->size();
 
   // This is used to check whether we do not try to add starting sequence to
   // frame that already had it added while demuxing ie. first uploaded frame
index b1790eef9e1f673a914081fb9fec751c48a06093..8db248984b93dce406c5bec82abea058a3912e7a 100644 (file)
@@ -1239,7 +1239,8 @@ bool VideoSampleEntry::Parse(BoxReader* reader) {
       break;
     }
 #if BUILDFLAG(ENABLE_PLATFORM_HEVC)
-#if BUILDFLAG(IS_TIZEN_TV) && !BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)
+#if BUILDFLAG(IS_TIZEN_TV) && !BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) && \
+    !defined(EWK_BRINGUP)  // FIXME: m126 bringup
     case FOURCC_DVHE:
       // We are either inside a dvhe box, or dvhe-turned-encv box.
       // Just try to get to the part of dvhe, which is HEVC (as in
index d56f900bfdb68a79f72dd238ac0a5d8474e21a87..aeb937ddbceaf616574ba6038139af1ef4657132 100644 (file)
@@ -187,6 +187,8 @@ BuildRequires: pkgconfig(xtst)
 %endif
 
 %if "%{?tizen_profile_name}" == "tv"
+BuildRequires: pkgconfig(launchpad)
+BuildRequires: pkgconfig(autoinput)
 BuildRequires: pkgconfig(aul-extension)
 BuildRequires: pkgconfig(capi-media-sound-manager)
 BuildRequires: pkgconfig(capi-stt-wrapper-tv)
@@ -264,7 +266,6 @@ BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(capi-appfw-package-manager)
 BuildRequires: pkgconfig(capi-appfw-service-application)
 BuildRequires: pkgconfig(cynara-client)
-BuildRequires: pkgconfig(launchpad)
 BuildRequires: pkgconfig(libwebappenc)
 BuildRequires: pkgconfig(message-port)
 BuildRequires: pkgconfig(wgt-manifest-handlers)
@@ -272,7 +273,6 @@ BuildRequires: pkgconfig(wgt-manifest-handlers)
 BuildRequires: app-signer
 BuildRequires: curl
 BuildRequires: pkgmgr-extension-devel
-BuildRequires: pkgconfig(autoinput)
 BuildRequires: pkgconfig(capi-media-player)
 BuildRequires: pkgconfig(capi-screensaver)
 BuildRequires: pkgconfig(settings-api)
index 41a8f3a5a506482f32dcc6c72049f9b278b61673..d90190703ee84bf0c31a1b64e09646284eab0ffd 100644 (file)
@@ -1760,7 +1760,7 @@ void FrameLoader::DispatchDidClearDocumentOfWindowObject() {
       if (settings && !settings->GetForceMainWorldInitialization()) {
         LOG(INFO) << "Forcing v8 initialization for hbbtv is enabled.";
         // Forcibly instantiate WindowProxy.
-        window->GetScriptController().WindowProxy(DOMWrapperWorld::MainWorld());
+        window->GetScriptController().WindowProxy(DOMWrapperWorld::MainWorld(window->GetIsolate()));
       }
     }
   }
index 7d3f2a8b7a14f26b375ebdf9564c3ea586f77b25..fde5305d1b81469e260b1746482525aef6e5b345 100644 (file)
@@ -873,6 +873,13 @@ tizen_pkg_config("accessory") {
   }
 }
 
+tizen_pkg_config("autoinput") {
+  packages = []
+  if (tizen_vd_accessory) {
+    packages = [ "autoinput" ]
+  }
+}
+
 if (enable_wrt_js) {
   tizen_pkg_config("appcore-agent") {
     packages = [ "appcore-agent" ]
@@ -921,9 +928,6 @@ if (enable_wrt_js) {
     tizen_pkg_config("aul-extension") {
       packages = [ "aul-extension" ]
     }
-    tizen_pkg_config("autoinput") {
-      packages = [ "autoinput" ]
-    }
     tizen_pkg_config("capi-screensaver") {
       packages = [ "capi-screensaver" ]
     }
index 0012cae3ce8cd38072ebf51b353a954c720fc14d..1bb4deca391027a08a7cf7455b2fb156f263ae7f 100644 (file)
@@ -179,7 +179,10 @@ std::vector<uint8_t> CreateBinaryDataFromString(const std::string& data) {
 // static
 bool IEMEDrmBridge::IsKeySystemSupported(const std::string& key_system) {
   CHECK(!key_system.empty());
+#if !defined(EWK_BRINGUP)  // FIXME: m126 bringup
   return eme::IEME::isKeySystemSupported(key_system) == eme::kSupported;
+#endif
+  return false;
 }
 
 IEMEDrmBridge::IEMEDrmBridge(
@@ -205,7 +208,9 @@ IEMEDrmBridge::IEMEDrmBridge(
       switches::kSingleProcess);
   LOG(INFO) << "single process mode:" << std::boolalpha << single_process_mode_;
   // TODO(mdebski): what is privacy_mode?
+#if !defined(EWK_BRINGUP)  // FIXME: m126 bringup
   cdm_.reset(eme::IEME::create(this, key_system_, false));
+#endif
   CHECK(cdm_.get());
 }
 
@@ -406,7 +411,7 @@ Decryptor* IEMEDrmBridge::GetDecryptor() {
 std::optional<base::UnguessableToken> IEMEDrmBridge::GetCdmId() const {
   // we want to use Decryptor API
   // return CdmContext::kInvalidCdmId;
-  return absl::nullopt;
+  return std::nullopt;
 }
 
 std::unique_ptr<CallbackRegistration> IEMEDrmBridge::RegisterEventCB(
@@ -459,7 +464,7 @@ void IEMEDrmBridge::DecryptInChromium(
   params.ukidlen = decrypt_conf->key_id().size();
   params.pdata = reinterpret_cast<unsigned char*>(
       const_cast<unsigned char*>(encrypted->data()));
-  params.udatalen = encrypted->data_size();
+  params.udatalen = encrypted->size();
   params.poutbuf = nullptr;
   params.uoutbuflen = 0;
   params.piv = reinterpret_cast<unsigned char*>(
index 33d2e73da5213a41980262668d3c193d70901780..883866d0de8b967e1853b2427bf8705c4ad125af 100644 (file)
@@ -229,7 +229,7 @@ esplusplayer_submit_status MediaPlayerESPlusPlayerTV::SubmitEsPacket(
     if (buffer->tz_handle())
       packet.buffer_size = buffer->tz_buffer_size();
     else
-      packet.buffer_size = buffer->data_size();
+      packet.buffer_size = buffer->size();
     packet.buffer = (char*)(const_cast<unsigned char*>(buffer->data()));
     packet.pts = buffer->timestamp().InMilliseconds();
     packet.duration = buffer->duration().InMilliseconds();
index 2c8bb8a23dcdd5604afd768489c921b149864f49..510bc849f5f7a6dc6d2bb3b9ad8ac1a6196e0ea2 100644 (file)
@@ -121,6 +121,7 @@ shared_library("chromium-ewk") {
   }
   if (tizen_vd_accessory) {
     configs += [ "//tizen_src/build:accessory" ]
+    configs += [ "//tizen_src/build:autoinput" ]
   }
   chrome_version = exec_script(version_script,
                                [
index 0a517f68263bd8b418751421c32a8a182aee661d..28500446d47f25590564fb0b7e577c20f408e7a6 100644 (file)
@@ -46,7 +46,9 @@
 
 #if BUILDFLAG(IS_TIZEN)
 #include <vconf.h>
+#endif
 
+#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)  // FIXME: m126 bringup
 #include "components/xwalk_extensions/browser/xwalk_extension_manager.h"
 #endif
 
index 333ac6f6f19372382f8586c7389996d54580b34d..d5bcc7238a7414c8faf197174fc603b5f3a17273 100644 (file)
@@ -18,7 +18,7 @@
 #include "renderer/content_renderer_client_efl.h"
 #include "ui/base/resource/resource_bundle.h"
 
-#if BUILDFLAG(IS_TIZEN)
+#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)  // FIXME: m126 bringup
 #include "components/xwalk_extensions/browser/xwalk_extension_manager.h"
 #endif
 
index 23834c5310cf929de8e8816e293b4ef857579b9b..9f90dcb46a4465c0cd26dc5428f07e44cae24306 100644 (file)
@@ -9,7 +9,9 @@
 
 #if BUILDFLAG(IS_TIZEN)
 #include <vconf/vconf.h>
+#endif
 
+#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)  // FIXME: m126 bringup
 #include "components/xwalk_extensions/renderer/xwalk_extension_renderer_controller.h"
 #endif
 
@@ -137,7 +139,7 @@ void ContentRendererClientEfl::RenderThreadStarted() {
   const base::CommandLine& command_line =
       *base::CommandLine::ForCurrentProcess();
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if BUILDFLAG(IS_TIZEN_TV) && !defined(EWK_BRINGUP)  // FIXME: m126 bringup
   if (command_line.HasSwitch(switches::kXWalkExtensionPath)) {
     wrt::XWalkExtensionRendererController::SetPrivilegeChecker(
         base::BindRepeating([]() -> bool {
index 13c701f8b17073de2c9b40cbc9a1a038b6cf121f..f99fb046f18e8f7d805acc70e881a5461d36468a 100644 (file)
@@ -17,7 +17,9 @@ void TizenAddKeySystems(
     const std::vector<std::string>& key_system_whitelist,
     std::vector<std::unique_ptr<media::KeySystemInfo>>* key_systems_info) {
   eme::supportedCDMList supportedKeySystems;
+#if !defined(EWK_BRINGUP)  // FIXME: m126 bringup
   eme::IEME::enumerateMediaKeySystems(&supportedKeySystems);
+#endif
   for (const auto& keySystem : supportedKeySystems) {
     if (!key_system_whitelist.empty() &&
         std::find(key_system_whitelist.begin(), key_system_whitelist.end(),
index 9e28284045411990667b5a5e09c311db81e05527..198f937f4652a1d9b1a7831be4046388280099e7 100644 (file)
@@ -22,18 +22,18 @@ inline constexpr char kAboutSrcdocPath[] = "srcdoc";
 inline constexpr char16_t kAboutSrcdocPath16[] = u"srcdoc";
 
 #if BUILDFLAG(IS_TIZEN_TV)
-COMPONENT_EXPORT(URL) extern const char kCIScheme[];
-COMPONENT_EXPORT(URL) extern const char16_t kCIScheme16[];
-COMPONENT_EXPORT(URL) extern const char kDvbScheme[];
-COMPONENT_EXPORT(URL) extern const char16_t kDvbScheme16[];
-COMPONENT_EXPORT(URL) extern const char kHbbTVCarouselScheme[];
-COMPONENT_EXPORT(URL) extern const char16_t kHbbTVCarouselScheme16[];
-COMPONENT_EXPORT(URL) extern const char kMmfScheme[];
-COMPONENT_EXPORT(URL) extern const char16_t kMmfScheme16[];
-COMPONENT_EXPORT(URL) extern const char kOpAppScheme[];
-COMPONENT_EXPORT(URL) extern const char16_t kOpAppScheme16[];
-COMPONENT_EXPORT(URL) extern const char kTVKeyScheme[];
-COMPONENT_EXPORT(URL) extern const char16_t kTVKeyScheme16[];
+inline constexpr const char kCIScheme[] = "ci";
+inline constexpr const char16_t kCIScheme16[] = u"ci";
+inline constexpr const char kDvbScheme[] = "dvb";
+inline constexpr const char16_t kDvbScheme16[] = u"dvb";
+inline constexpr const char kHbbTVCarouselScheme[] = "hbbtv-carousel";
+inline constexpr const char16_t kHbbTVCarouselScheme16[] = u"hbbtv-carousel";
+inline constexpr const char kMmfScheme[] = "mmf";
+inline constexpr const char16_t kMmfScheme16[] = u"mmf";
+inline constexpr const char kOpAppScheme[] = "hbbtv-package";
+inline constexpr const char16_t kOpAppScheme16[] = u"hbbtv-package";
+inline constexpr const char kTVKeyScheme[] = "tvkey-apps";
+inline constexpr const char16_t kTVKeyScheme16[] = u"tvkey-apps";
 #endif
 inline constexpr char kAboutScheme[] = "about";
 inline constexpr char16_t kAboutScheme16[] = u"about";