[M120 Migration][HBBTV] Implement ewk_context_register_jsplugin_mime_types 81/308481/2
authorfang fengrong <fr.fang@samsung.com>
Tue, 26 Mar 2024 08:37:29 +0000 (16:37 +0800)
committerBot Blink <blinkbot@samsung.com>
Wed, 27 Mar 2024 17:59:25 +0000 (17:59 +0000)
remove EWK_BRINGUP
add fixup code

refer:
https://review.tizen.org/gerrit/#/c/290762

Change-Id: Iedd44b169d45a2063d385649d7266c5947cfa689
Signed-off-by: fang fengrong <fr.fang@samsung.com>
third_party/blink/common/mime_util/mime_util.cc
tizen_src/ewk/efl_integration/content_browser_client_efl.cc

index 1264d3d..ad06180 100644 (file)
@@ -204,13 +204,10 @@ bool MimeUtil::IsSupportedMimeType(const std::string& mime_type) const {
 #if BUILDFLAG(IS_TIZEN_TV)
 void MimeUtil::RegisterJavascriptPluginMimeTypes(
     const std::string& mime_types) {
-  LOG(ERROR) << " Remove EWK_BRINGUP ";
-#if !defined(EWK_BRINGUP)
   std::stringstream stream(mime_types);
   std::string mime_type;
   while (std::getline(stream, mime_type, ','))
     javascript_plugin_types_.insert(base::ToLowerASCII(mime_type));
-#endif
 }
 
 bool MimeUtil::IsSupportedJavascriptPluginMimeType(
index f1b887e..8dd4543 100644 (file)
@@ -144,6 +144,10 @@ void AppendExtraCommandLineSwitchesInternal(base::CommandLine* command_line,
                                     cors_enabled_url_schemes);
   }
 
+  const std::string& mime_types = HbbtvWidgetHost::Get().GetJSPluginMimeTypes();
+  if (!mime_types.empty())
+    command_line->AppendSwitchASCII(switches::kJSPluginMimeTypes, mime_types);
+
   const double time_offset =
       static_cast<BrowserContextEfl*>(host->GetBrowserContext())
           ->GetTimeOffset();