[Content Navigator] Add a runtime flag and ewk apis for content navigator. 60/319460/1
authorSun-woo Nam <sunny.nam@samsung.com>
Wed, 23 Oct 2024 00:37:29 +0000 (17:37 -0700)
committerSun-woo Nam <sunny.nam@samsung.com>
Wed, 23 Oct 2024 08:30:22 +0000 (01:30 -0700)
Add content navigator specific flags and ewk apis.

- build flag - TIZEN_CONTENT_NAVIGATOR
  : Enabled in a TV platform.

- runtime flag : IsContentNavigator
  : Enabled by command line switch - "--enable-content-navigator"

- ewk apis for enabling in a web browser.
  void ewk_view_content_navigator_enabled_set(Evas_Object* ewk_view, Eina_Bool enabled)
  Eina_Bool ewk_view_content_navigator_enabled_get(const Evas_Object* ewk_view)

Change-Id: Ib7ee8309c2a7d19d6b1c35a69b4991cfb74149a6
Signed-off-by: Sun-woo Nam <sunny.nam@samsung.com>
56 files changed:
components/plugins/renderer/webview_plugin.h
content/browser/renderer_host/render_widget_host_impl.cc
content/browser/renderer_host/render_widget_host_impl.h
content/browser/renderer_host/render_widget_host_view_aura.cc
content/browser/renderer_host/render_widget_host_view_aura.h
content/browser/renderer_host/render_widget_host_view_base.h
content/common/navigation_params_utils.h
content/public/browser/content_browser_client.cc
content/public/browser/web_contents_delegate.h
third_party/blink/public/mojom/BUILD.gn
third_party/blink/public/mojom/widget/platform_widget.mojom
third_party/blink/public/platform/web_application_type.h
third_party/blink/renderer/core/css/css_default_style_sheets.cc
third_party/blink/renderer/core/css/css_default_style_sheets.h
third_party/blink/renderer/core/dom/element.cc
third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
third_party/blink/renderer/core/frame/web_frame_widget_impl.h
third_party/blink/renderer/core/fullscreen/fullscreen.cc
third_party/blink/renderer/core/html/media/html_media_element.cc
third_party/blink/renderer/core/html/media/html_media_element.h
third_party/blink/renderer/core/html/media/html_video_element.cc
third_party/blink/renderer/core/html/media/html_video_element.h
third_party/blink/renderer/modules/media_controls/BUILD.gn
third_party/blink/renderer/modules/media_controls/elements/media_control_fullscreen_button_element.cc
third_party/blink/renderer/modules/media_controls/elements/media_control_play_button_element.cc
third_party/blink/renderer/modules/media_controls/elements/media_control_playback_speed_button_element.cc
third_party/blink/renderer/modules/media_controls/elements/media_control_playback_speed_list_element.cc
third_party/blink/renderer/modules/media_controls/elements/media_control_playback_speed_list_element.h
third_party/blink/renderer/modules/media_controls/elements/media_control_popup_menu_element.cc
third_party/blink/renderer/modules/media_controls/elements/media_control_popup_menu_element.h
third_party/blink/renderer/modules/media_controls/elements/media_control_remaining_time_display_element.cc
third_party/blink/renderer/modules/media_controls/media_controls_impl.cc
third_party/blink/renderer/modules/media_controls/media_controls_impl.h
third_party/blink/renderer/modules/media_controls/media_controls_media_event_listener.cc
third_party/blink/renderer/modules/media_controls/media_controls_resource_loader.cc
third_party/blink/renderer/modules/media_controls/media_controls_resource_loader.h
third_party/blink/renderer/platform/widget/widget_base.cc
third_party/blink/renderer/platform/widget/widget_base.h
tizen_src/build/config/BUILD.gn
tizen_src/build/config/tizen_features.gni
tizen_src/build/gn_chromiumefl.sh
tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.h
tizen_src/chromium_impl/third_party/blink/renderer/platform/web_application_type.cc
tizen_src/ewk/efl_integration/command_line_efl.cc
tizen_src/ewk/efl_integration/common/application_type.cc
tizen_src/ewk/efl_integration/common/application_type.h
tizen_src/ewk/efl_integration/common/content_switches_efl.cc
tizen_src/ewk/efl_integration/common/content_switches_efl.h
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h
tizen_src/ewk/efl_integration/eweb_view_callbacks.h
tizen_src/ewk/efl_integration/public/ewk_view.cc
tizen_src/ewk/efl_integration/public/ewk_view_product.h
tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc
tizen_src/ewk/efl_integration/web_contents_delegate_efl.h

index 9f8cc132760c7e84b0f6f7755db8cf117a828e59..f3cce9c03a73ad0335fc1c72d4162dfbcc673f3a 100644 (file)
@@ -201,6 +201,8 @@ class WebViewPlugin : public blink::WebPlugin, public blink::WebViewObserver {
     void NotifyTrackInfoToBrowser(int active_track_id,
                                   const std::string& url,
                                   const std::string& lang) override {}
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     void NotifyHWBack() override {}
     void MediaSettingClicked() override {}
 #endif
index c5ad1b7908fcfaf1e7d3f4b0295550fc5bd03615..758a3bc4bf36b24fc06f9b8875913c75c54abab6 100644 (file)
@@ -2972,7 +2972,9 @@ void RenderWidgetHostImpl::NotifyTrackInfoToBrowser(int active_track_id,
 
   view_->NotifyTrackInfoToBrowser(active_track_id, url, lang);
 }
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void RenderWidgetHostImpl::NotifyHWBack() {
   if (!GetView())
     return;
index d9681da374513c4e6dd5dfc963b8c359fd8330f6..dab9f665eb0fc6692c67ba070bfec4ed65e2d28c 100644 (file)
@@ -326,6 +326,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
   void NotifyTrackInfoToBrowser(int active_track_id,
                                 const std::string& url,
                                 const std::string& lang) override;
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void NotifyHWBack() override;
   void MediaSettingClicked() override;
 #endif
index 4a7840b310dc496e6576500677ce707de6cdf205..34b738b284a8d0cc3c6d1e2f50f8201b88a8a2d5 100644 (file)
@@ -2506,7 +2506,9 @@ void RenderWidgetHostViewAura::NotifyTrackInfoToBrowser(
   }
   aura_efl_helper()->NotifyTrackInfoToBrowser(active_track_id, url, lang);
 }
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void RenderWidgetHostViewAura::NotifyHWBack() {
   if (aura_efl_helper())
     aura_efl_helper()->NotifyHWBack();
index 2fcfc3bbb870621ff9c07fc7ac3d9228b0215ba7..b95b6dc913c487c58276da6eea7f2c6f9a6ef849 100644 (file)
@@ -245,6 +245,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
   void NotifyTrackInfoToBrowser(int active_track_id,
                                 const std::string& url,
                                 const std::string& lang) override;
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void NotifyHWBack() override;
   void MediaSettingClicked() override;
 #endif
index b7988e6cecf07737731928fc0cda240de2e788a7..c81d18e45bc62c0406d781b354d824ee4ca2a795 100644 (file)
@@ -530,7 +530,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
   virtual void NotifyTrackInfoToBrowser(int active_track_id,
                                         const std::string& url,
                                         const std::string& lang) {}
-
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   virtual void NotifyHWBack() {}
 
   virtual void MediaSettingClicked() {}
index 7c3263aae2019e6e7919a11e067be9e7e7d54089..77b378f2fd0afbe7c0ab4eb6b1242858ae624b5b 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "third_party/blink/public/mojom/navigation/navigation_params.mojom-shared.h"
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "tizen_src/ewk/efl_integration/common/application_type.h"
 #endif
 
@@ -21,10 +21,9 @@ class NavigationTypeUtils {
   }
 
   static bool IsSameDocument(blink::mojom::NavigationType value) {
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     // FIXME: This is temporary code to back to the same document page.
-    // TODO: Should be changed to IsContentNavigator()
-    if (!IsWebBrowser())
+    if (IsContentNavigator())
       return false;
     else
 #endif
index 9493b065bb5d92166eca64a4e1eb23e0271fce94..0797def0cc212d47a90a93d8b99b2913213f3f7d 100644 (file)
@@ -85,7 +85,7 @@
 #include "content/public/browser/tts_environment_android.h"
 #endif
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "tizen_src/ewk/efl_integration/common/application_type.h"
 #endif
 
@@ -1416,9 +1416,8 @@ bool ContentBrowserClient::IsClipboardCopyAllowed(
 }
 
 bool ContentBrowserClient::CanEnterFullscreenWithoutUserActivation() {
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser())
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator())
     return true;
   else
 #endif
index 86e96ae25667346a0f15431f4da1c214b843939a..f3780a2df952d5519f23340e71346e03d3e0cf7b 100644 (file)
@@ -803,6 +803,8 @@ class CONTENT_EXPORT WebContentsDelegate {
 #endif
 
   virtual void NotifyMediaDeviceConnectionChanged(int device_type) {}
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   virtual void NotifyHWBack() {}
   virtual void MediaSettingClicked() {}
 #endif
index e9390125aaedcc6372d42db9d2ebad8a236e8002..12cf96c250e13e14552b7f492b3ceddba64eb343 100644 (file)
@@ -391,6 +391,9 @@ mojom("mojom_platform") {
   if (tizen_vd_native_scrollbars) {
     enabled_features += [ "tizen_vd_native_scrollbars" ]
   }
+  if (tizen_content_navigator) {
+    enabled_features += [ "tizen_content_navigator" ]
+  }
 
   shared_cpp_typemaps = [
     {
index d323ba800b9b3a3ed91960b197513650c66c33f9..32a9047c3262fb2e8a2eb0da2170ff4abddba7ca 100644 (file)
@@ -53,10 +53,10 @@ interface WidgetHost {
   [EnableIf=is_tizen_tv]
   NotifyTrackInfoToBrowser(int32 active_track_id, string url, string lang);
 
-  [EnableIf=is_tizen_tv]
+  [EnableIf=tizen_content_navigator]
   NotifyHWBack();
 
-  [EnableIf=is_tizen_tv]
+  [EnableIf=tizen_content_navigator]
   MediaSettingClicked();
 
   // Sent by a widget to the browser to set the tooltip text and trigger a
index dcfd3c27f7228cb4a00f0c8a2219a6c8c9c75c08..d091136ce23f68fbe9d98af3142a78ba0e58bb5e 100644 (file)
@@ -27,6 +27,7 @@ bool IsHbbTV();
 bool IsTIZENWRT();
 bool IsTVPlus();
 bool IsKnoxBrowser();
+bool IsContentNavigator();
 
 }  // namespace blink
 
index 68e627a51e3fa2b7ff315f3cf92af38b0261fb93..0ff6190ffa3f6913c144662385665bbcde81495e 100644 (file)
@@ -54,7 +54,7 @@
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 #include "third_party/blink/renderer/platform/wtf/leak_annotations.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "third_party/blink/public/platform/web_application_type.h"
 #include "third_party/blink/renderer/core/fullscreen/fullscreen.h"
 #endif
@@ -128,7 +128,7 @@ void CSSDefaultStyleSheets::PrepareForLeakDetection() {
   svg_style_sheet_.Clear();
   mathml_style_sheet_.Clear();
   media_controls_style_sheet_.Clear();
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   media_controls_fullscreen_style_sheet_.Clear();
 #endif
   text_track_style_sheet_.Clear();
@@ -150,7 +150,7 @@ void CSSDefaultStyleSheets::PrepareForLeakDetection() {
 
 void CSSDefaultStyleSheets::VerifyUniversalRuleCount() {
   // FIXME: Add runtime flags for content navigator.
-#if 0 // EXPENSIVE_DCHECKS_ARE_ON()
+#if !defined(TIZEN_CONTENT_NAVIGATOR)
   // Universal bucket rules need to be checked against every single element,
   // thus we want avoid them in UA stylesheets.
   default_html_style_->CompactRulesIfNeeded();
@@ -260,7 +260,7 @@ void CSSDefaultStyleSheets::AddRulesToDefaultStyleSheets(
   VerifyUniversalRuleCount();
 }
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void CSSDefaultStyleSheets::ClearMediaControlsStyle() {
   default_media_controls_style_ = MakeGarbageCollected<RuleSet>();
 }
@@ -286,9 +286,8 @@ bool CSSDefaultStyleSheets::EnsureDefaultStyleSheetsForElement(
     changed_default_style = true;
   }
 
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser() && HasMediaControlsStyleSheetLoader() && IsA<HTMLVideoElement>(element) ||
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator() && HasMediaControlsStyleSheetLoader() && IsA<HTMLVideoElement>(element) ||
       IsA<HTMLAudioElement>(element)) {
     if (Fullscreen::IsFullscreenElement(element)) {
       if (!media_controls_fullscreen_style_sheet_) {
@@ -537,7 +536,7 @@ void CSSDefaultStyleSheets::Trace(Visitor* visitor) const {
   visitor->Trace(svg_style_sheet_);
   visitor->Trace(mathml_style_sheet_);
   visitor->Trace(media_controls_style_sheet_);
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   visitor->Trace(media_controls_fullscreen_style_sheet_);
 #endif
   visitor->Trace(permission_element_style_sheet_);
index 60345381905bfe4424c592903dc30d4fdeccc81f..aafbea9dfef75f7323cbddaad5cacfe45f715adc 100644 (file)
@@ -113,7 +113,7 @@ class CSSDefaultStyleSheets final
     UAStyleSheetLoader& operator=(const UAStyleSheetLoader&) = delete;
     virtual ~UAStyleSheetLoader() = default;
     virtual String GetUAStyleSheet() = 0;
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     virtual String GetFullscreenUAStyleSheet() = 0;
 #endif
   };
@@ -131,7 +131,7 @@ class CSSDefaultStyleSheets final
   void InitializeDefaultStyles();
   void VerifyUniversalRuleCount();
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void ClearMediaControlsStyle();
 #endif
 
@@ -164,7 +164,7 @@ class CSSDefaultStyleSheets final
   Member<StyleSheetContents> svg_style_sheet_;
   Member<StyleSheetContents> mathml_style_sheet_;
   Member<StyleSheetContents> media_controls_style_sheet_;
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   Member<StyleSheetContents> media_controls_fullscreen_style_sheet_;
 #endif
   Member<StyleSheetContents> permission_element_style_sheet_;
index 2d228ee9c9d1b7160910d0bc2b0ba23a74ec9896..0cbb7d423dcbee5a0ee801dd28eb02e6bca70004 100644 (file)
 #include "ui/accessibility/ax_mode.h"
 #include "ui/gfx/geometry/rect_conversions.h"
 
-#if BUILDFLAG(IS_TIZEN_TV)
-#include "third_party/blink/public/platform/web_application_type.h"
-#endif
-
 namespace blink {
 
 enum class ClassStringContent { kEmpty, kWhiteSpaceOnly, kHasClasses };
index 87db366a54093b20c5fbc4887ed77d06ff61a9a4..3d59686296cf6d8df29abe5caca41543ad38c435 100644 (file)
@@ -5293,7 +5293,9 @@ void WebFrameWidgetImpl::NotifyTrackInfoToBrowser(int active_track_id,
 void WebFrameWidgetImpl::MoveFocusToBrowser(int direction) {
   widget_base_->MoveFocusToBrowser(direction);
 }
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void WebFrameWidgetImpl::NotifyHWBack() {
   LOG(INFO) << __func__;
   widget_base_->NotifyHWBack();
index 67a69f73b5b00b23d859899d1bfb03062b671717..6fd74e48db04f02f8ff71d589b19ca6ff365d701 100644 (file)
@@ -713,9 +713,11 @@ class CORE_EXPORT WebFrameWidgetImpl
   void NotifyTrackInfoToBrowser(int active_track_id,
                                 const std::string& url,
                                 const std::string& lang);
+  void MoveFocusToBrowser(int direction);
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void NotifyHWBack();
   void MediaSettingClicked();
-  void MoveFocusToBrowser(int direction);
 #endif
 
  protected:
index d77b24d69ee594fb680006c60e1d16159621ac41..c4f8b2646e4e177e8b633af7f95ef4cc28130173 100644 (file)
@@ -64,7 +64,7 @@
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 #include "third_party/blink/renderer/platform/scheduler/public/event_loop.h"
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "third_party/blink/public/platform/web_application_type.h"
 #include "third_party/blink/renderer/core/html/media/html_media_element.h"
 #endif
@@ -352,9 +352,8 @@ bool AllowedToRequestFullscreen(Document& document) {
   // true:
 
   // The algorithm is triggered by a user activation.
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser() || LocalFrame::HasTransientUserActivation(document.GetFrame()))
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator() || LocalFrame::HasTransientUserActivation(document.GetFrame()))
 #else
   if (LocalFrame::HasTransientUserActivation(document.GetFrame()))
 #endif
@@ -915,9 +914,8 @@ void Fullscreen::ContinueRequestFullscreen(Document& document,
     // https://crbug.com/644695
 
     // 13.4. Fullscreen |element| within |doc|.
-#if BUILDFLAG(IS_TIZEN_TV)
-    // TODO: Should be changed to IsContentNavigator()
-    if (!IsWebBrowser() && element->tagName() != "VIDEO" && element->tagName() != "IFRAME") {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+    if (IsContentNavigator() && element->tagName() != "VIDEO" && element->tagName() != "IFRAME") {
       StaticElementList* video_elements =
           element->QuerySelectorAll(AtomicString("video"));
       Element* video_element;
index 87d0c527b1742131f3b7c21698728943fc2b7bfa..9581c571d8538880a242b467b7ef32bb180306c0 100644 (file)
@@ -4631,34 +4631,6 @@ void HTMLMediaElement::NotifyTrackInfoToBrowser(int active_track_id) {
   }
 }
 
-void HTMLMediaElement::NotifyHWBack() {
-  LOG(INFO) << __func__;
-
-  LocalFrame* frame = GetDocument().GetFrame();
-  if (!frame) {
-    LOG(ERROR) << "frame is null";
-    return;
-  }
-
-  WebFrameWidgetImpl* wfwgt =
-      static_cast<WebFrameWidgetImpl*>(frame->GetWidgetForLocalRoot());
-  wfwgt->NotifyHWBack();
-}
-
-void HTMLMediaElement::MediaSettingClicked() {
-  LOG(INFO) << __func__;
-
-  LocalFrame* frame = GetDocument().GetFrame();
-  if (!frame) {
-    LOG(ERROR) << "frame is null";
-    return;
-  }
-
-  WebFrameWidgetImpl* wfwgt =
-      static_cast<WebFrameWidgetImpl*>(frame->GetWidgetForLocalRoot());
-  wfwgt->MediaSettingClicked();
-}
-
 void HTMLMediaElement::RequestReload(const KURL& new_url) {
   DCHECK(GetWebMediaPlayer());
   DCHECK(new_url.IsValid());
@@ -5055,7 +5027,99 @@ void HTMLMediaElement::WRTMediaSuspend(bool suspend) {
 bool HTMLMediaElement::HasEncryptedListener() const {
   return HasEventListeners(event_type_names::kEncrypted);
 }
-#endif
+#endif  // IS_TIZEN_TV
+
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+void HTMLMediaElement::NotifyHWBack() {
+  LOG(INFO) << __func__;
+
+  LocalFrame* frame = GetDocument().GetFrame();
+  if (!frame) {
+    LOG(ERROR) << "frame is null";
+    return;
+  }
+
+  WebFrameWidgetImpl* wfwgt =
+      static_cast<WebFrameWidgetImpl*>(frame->GetWidgetForLocalRoot());
+  wfwgt->NotifyHWBack();
+}
+
+void HTMLMediaElement::MediaSettingClicked() {
+  LOG(INFO) << __func__;
+
+  LocalFrame* frame = GetDocument().GetFrame();
+  if (!frame) {
+    LOG(ERROR) << "frame is null";
+    return;
+  }
+
+  WebFrameWidgetImpl* wfwgt =
+      static_cast<WebFrameWidgetImpl*>(frame->GetWidgetForLocalRoot());
+  wfwgt->MediaSettingClicked();
+}
+
+std::vector<std::string> ignore_class_list{
+    "-ad-",              /* youtube ad */
+    "tiktok-web-player", /* tiktok player */
+    "movieSlider"        /* namava trailer */
+};
+
+void HTMLMediaElement::EnterFullscreen() {
+  if (AllowAutoFullscreen())
+    webkitEnterFullscreen();
+}
+
+bool HTMLMediaElement::AllowAutoFullscreen() {
+  if (!IsContentNavigator())
+    return false;
+
+  if (!IsHTMLVideoElement())
+    return false;
+
+  // Check NetworkState
+  if (network_state_ == 0)
+    return false;
+
+  // Check ReadyState
+  if (ready_state_ == 0)
+    return false;
+
+  // Ignore videos including some class attributes.
+  Element* element = this;
+  while (element != nullptr) {
+    for (auto& class_list : ignore_class_list) {
+      if (element->classList().value().Contains(
+              AtomicString(class_list.c_str()))) {
+        LOG(INFO) << __func__ << " Ignore fullscreen mode. (maybe ad)";
+        return false;
+      }
+    }
+    element = element->parentElement();
+  }
+
+  // Check the video size
+  LocalDOMWindow* window =
+      GetDocument() != nullptr ? GetDocument().domWindow() : nullptr;
+  if (!window)
+    return false;
+
+  LOG(INFO) << __func__ << " Offset Size: " << OffsetWidth() << " x "
+            << OffsetHeight();
+  if (OffsetWidth() > OffsetHeight()) {
+    if (OffsetWidth() < window->innerWidth() / 3 ||
+        OffsetHeight() < window->innerHeight() / 2) {
+      return false;
+    }
+  } else {
+    if (OffsetHeight() < window->innerHeight() / 2) {
+      return false;
+    }
+  }
+
+  return true;
+}
+#endif  // defined(TIZEN_CONTENT_NAVIGATOR)
+
 double HTMLMediaElement::getStartDate() const {
 #if BUILDFLAG(IS_TIZEN_TV)
   if (!IsHbbTV() || !GetWebMediaPlayer()) {
@@ -5618,70 +5682,6 @@ void HTMLMediaElement::CreatePlaceholderTracksIfNecessary() {
   }
 }
 
-#if BUILDFLAG(IS_TIZEN_TV)
-std::vector<std::string> ignore_class_list{
-    "-ad-",              /* youtube ad */
-    "tiktok-web-player", /* tiktok player */
-    "movieSlider"        /* namava trailer */
-};
-
-void HTMLMediaElement::EnterFullscreen() {
-  if (AllowAutoFullscreen())
-    webkitEnterFullscreen();
-}
-
-bool HTMLMediaElement::AllowAutoFullscreen() {
-  // TODO: Should be changed to IsContentNavigator()
-  if (IsWebBrowser())
-    return false;
-
-  if (!IsHTMLVideoElement())
-    return false;
-
-  // Check NetworkState
-  if (network_state_ == 0)
-    return false;
-
-  // Check ReadyState
-  if (ready_state_ == 0)
-    return false;
-
-  // Ignore videos including some class attributes.
-  Element* element = this;
-  while (element != nullptr) {
-    for (auto& class_list : ignore_class_list) {
-      if (element->classList().value().Contains(
-              AtomicString(class_list.c_str()))) {
-        LOG(INFO) << __func__ << " Ignore fullscreen mode. (maybe ad)";
-        return false;
-      }
-    }
-    element = element->parentElement();
-  }
-
-  // Check the video size
-  LocalDOMWindow* window =
-      GetDocument() != nullptr ? GetDocument().domWindow() : nullptr;
-  if (!window)
-    return false;
-
-  LOG(INFO) << __func__ << " Offset Size: " << OffsetWidth() << " x "
-            << OffsetHeight();
-  if (OffsetWidth() > OffsetHeight()) {
-    if (OffsetWidth() < window->innerWidth() / 3 ||
-        OffsetHeight() < window->innerHeight() / 2) {
-      return false;
-    }
-  } else {
-    if (OffsetHeight() < window->innerHeight() / 2) {
-      return false;
-    }
-  }
-
-  return true;
-}
-#endif
-
 void HTMLMediaElement::SetNetworkState(NetworkState state,
                                        bool update_media_controls) {
   if (network_state_ == state)
index c97033df28134e4413b78d5fd591a225cd404079..cd8612e8662a1a4409bc49083152745a677e5ec9 100644 (file)
@@ -417,8 +417,6 @@ class CORE_EXPORT HTMLMediaElement
 #if BUILDFLAG(IS_TIZEN_TV)
   WebString GetContentMIMEType() override;
   void NotifyTrackInfoToBrowser(int active_track_id) override;
-  void NotifyHWBack();
-  void MediaSettingClicked();
   void RequestReload(const KURL& new_url);
   void SetTranslatedURL(const String&) override;
   bool IsHTMLMediaElement() const override { return true; }
@@ -442,7 +440,11 @@ class CORE_EXPORT HTMLMediaElement
   void OnContentIdChange(const std::string& id) override;
   void WRTMediaSuspend(bool suspend) override;
   bool HasEncryptedListener() const override;
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  void NotifyHWBack();
+  void MediaSettingClicked();
   void EnterFullscreen();
 #endif
 
@@ -729,7 +731,9 @@ class CORE_EXPORT HTMLMediaElement
   void DisableOtherAudioTracks(AudioTrack*);
   int FindMatchTrack(const String& lang);
   bool IsTs();
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   virtual void webkitEnterFullscreen() {}
   bool AllowAutoFullscreen();
 #endif
index d04acfa37302e45c445f3a8d8dc2ebeb0cefe562..083112f20e84e1158b24316baf203c3b55fcae1f 100644 (file)
@@ -428,7 +428,6 @@ void HTMLVideoElement::OnFirstFrame(base::TimeTicks frame_time,
 
 void HTMLVideoElement::webkitEnterFullscreen() {
   if (!IsFullscreen()) {
-    VLOG(0) << __func__;
     FullscreenOptions* options = FullscreenOptions::Create();
     options->setNavigationUI("hide");
     Fullscreen::RequestFullscreen(*this, options,
index 34e0a0d1884159b3f784d6452be2ce80b8f51329..61cefb2cbe64820fc1a9015b5a0c13b2ab8907af 100644 (file)
@@ -73,7 +73,7 @@ class CORE_EXPORT HTMLVideoElement final
   }
 
   // Fullscreen
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void webkitEnterFullscreen() final;
 #else
   void webkitEnterFullscreen();
index 0f1f0df3d152c4bc9a2096a5c1d6754984de7bc3..daff7328b13e2c86d0c052b77c4fe2a8e70afce0 100644 (file)
@@ -10,7 +10,7 @@ if (is_android) {
   import("//build/config/android/rules.gni")
 }
 
-if (tizen_product_tv) {
+if (tizen_content_navigator) {
   import(
       "//tizen_src/chromium_impl/third_party/blink/renderer/modules/media_controls/elements/elements.gni")
 }
@@ -115,7 +115,7 @@ blink_modules_sources("media_controls") {
     "//third_party/blink/renderer/modules/screen_orientation",
   ]
 
-  if (tizen_product_tv) {
+  if (tizen_content_navigator) {
     sources += external_media_controls_elements_sources
   }
 }
index ca0045c3a38bb2d70473cfccaf701749c744d951..abe6b7e059fc6a8087eee1b1ec7ab5abc2cfe7b8 100644 (file)
@@ -63,7 +63,7 @@ const char* MediaControlFullscreenButtonElement::GetNameForHistograms() const {
 
 void MediaControlFullscreenButtonElement::DefaultEventHandler(Event& event) {
   if (!IsDisabled() && (event.type() == event_type_names::kClick ||
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
                         event.type() == event_type_names::kKeydown ||
 #endif
                         event.type() == event_type_names::kGesturetap)) {
index 10c56da1d977d6100674aa8f58cba7d4f35c1f36..974409c64b347ca1e466cfffb0a61a2b7d01b1f6 100644 (file)
@@ -57,7 +57,7 @@ const char* MediaControlPlayButtonElement::GetNameForHistograms() const {
 
 void MediaControlPlayButtonElement::DefaultEventHandler(Event& event) {
   if (!IsDisabled() && (event.type() == event_type_names::kClick ||
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
                         event.type() == event_type_names::kKeydown ||
 #endif
                         event.type() == event_type_names::kGesturetap)) {
index a4e71d2543c0d6793a88a446bb807afd5b2c3286..701c794c7bf9ff333cdcfb8d7f48a432438bc4f7 100644 (file)
@@ -45,7 +45,7 @@ const char* MediaControlPlaybackSpeedButtonElement::GetNameForHistograms()
 
 void MediaControlPlaybackSpeedButtonElement::DefaultEventHandler(Event& event) {
   if (event.type() == event_type_names::kClick ||
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
       event.type() == event_type_names::kKeydown ||
 #endif
       event.type() == event_type_names::kGesturetap) {
index 91f6eb8921c48466f311cd62459de2336b2e94a8..0bd72aae078ee7deb87fd6a58e444a820c5c32a4 100644 (file)
@@ -23,7 +23,7 @@
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
 #include "third_party/blink/renderer/platform/text/platform_locale.h"
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "third_party/blink/renderer/modules/media_controls/elements/media_control_playback_speed_button_element.h"
 #endif
 
@@ -119,7 +119,7 @@ void MediaControlPlaybackSpeedListElement::SetIsWanted(bool wanted) {
   MediaControlPopupMenuElement::SetIsWanted(wanted);
 }
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 Element* MediaControlPlaybackSpeedListElement::PopupAnchor() const {
   return &GetMediaControls().PlaybackSpeedButton();
 }
@@ -127,13 +127,13 @@ Element* MediaControlPlaybackSpeedListElement::PopupAnchor() const {
 
 void MediaControlPlaybackSpeedListElement::DefaultEventHandler(Event& event) {
   if (event.type() == event_type_names::kClick
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
       || event.type() == event_type_names::kKeydown
 #endif
   ) {
     // This handles the back button click. Clicking on a menu item triggers the
     // change event instead.
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     SetIsWanted(false);
     if (!MediaElement().IsFullscreen())
 #endif
@@ -239,7 +239,7 @@ void MediaControlPlaybackSpeedListElement::RefreshPlaybackSpeedListMenu() {
   EventDispatchForbiddenScope::AllowUserAgentEvents allow_events;
   RemoveChildren(kOmitSubtreeModifiedEvent);
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   if (!MediaElement().IsFullscreen())
 #endif
     ParserAppendChild(CreatePlaybackSpeedHeaderItem());
index 6bc76cff41848418856deb50088eaf13a73851cb..d1e96ac65d81e8e3c32548b9c6fe02720f5d42f6 100644 (file)
@@ -22,7 +22,7 @@ class MediaControlPlaybackSpeedListElement final
 
   void SetIsWanted(bool) final;
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   Element* PopupAnchor() const override;
 #endif
 
index b1db63dd2211f181c76ef3fe1134c6c9e3dd1718..8a627f2c46be249069ee06d7c7dd949afd69ef13 100644 (file)
@@ -98,7 +98,7 @@ class MediaControlPopupMenuElement::EventListener final
         case VKEY_RETURN:
         case VKEY_SPACE:
           To<Element>(event->target()->ToNode())->DispatchSimulatedClick(event);
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
           if (!popup_menu_->MediaElement().IsFullscreen())
 #endif
             popup_menu_->FocusPopupAnchorIfOverflowClosed();
@@ -114,7 +114,7 @@ class MediaControlPopupMenuElement::EventListener final
     } else if (event->type() == event_type_names::kResize ||
                event->type() == event_type_names::kScroll ||
                event->type() == event_type_names::kBeforetoggle) {
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
       if (!popup_menu_->MediaElement().IsFullscreen())
 #endif
         popup_menu_->SetIsWanted(false);
@@ -148,7 +148,7 @@ void MediaControlPopupMenuElement::SetIsWanted(bool wanted) {
                           HidePopoverTransitionBehavior::kNoEventsNoWaiting,
                           nullptr);
     }
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     if (MediaElement().IsFullscreen())
 #endif
       MediaElement().Focus();
index 1d94473d227065812fbe04b5b9ae477cbdda6001..c4a60560b55c4f22d411003b5fab87147b9fcfba 100644 (file)
@@ -32,14 +32,14 @@ class MediaControlPopupMenuElement : public MediaControlDivElement {
 
   void SetPosition();
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   virtual Element* PopupAnchor() const;
 #endif
 
  private:
   class EventListener;
 
-#if !BUILDFLAG(IS_TIZEN_TV)
+#if !defined(TIZEN_CONTENT_NAVIGATOR)
   Element* PopupAnchor() const;
 #endif
 
index 2c67da4aa61cff38fc0e3613ce4cb78b48cc723f..fca05fb5a1f05c3c6df97e6bfae9d1cd9da565bb 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "third_party/blink/public/strings/grit/blink_strings.h"
 #include "third_party/blink/renderer/modules/media_controls/media_controls_impl.h"
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "third_party/blink/renderer/core/html/media/html_media_element.h"
 #endif
 
@@ -34,7 +34,7 @@ int MediaControlRemainingTimeDisplayElement::EstimateElementWidth() const {
 }
 
 String MediaControlRemainingTimeDisplayElement::FormatTime() const {
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   if (MediaElement().IsFullscreen()) {
     return MediaControlTimeDisplayElement::FormatTime();
   } else
index bb4bfeed47f4ec857dcf65736cfe4ac316b10114..e3b51ba5878ad18529d50bc766184695f718ac92 100644 (file)
 #include "third_party/blink/renderer/platform/web_test_support.h"
 #include "ui/gfx/geometry/size.h"
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 #include "third_party/blink/public/platform/web_application_type.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
 #include "third_party/blink/renderer/core/html/html_collection.h"
@@ -144,7 +144,7 @@ const char* const kStateCSSClasses[8] = {
     "state-scrubbing",                 // kScrubbing
 };
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 enum class FullscreenElement {
   kBack,
   kRestart,
@@ -187,9 +187,8 @@ void MaybeParserAppendChild(Element* parent, Element* child) {
 }
 
 bool ShouldShowPlaybackSpeedButton(HTMLMediaElement& media_element) {
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser() && media_element.IsFullscreen())
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator() && media_element.IsFullscreen())
     return true;
 #endif
   // The page disabled the button via the controlsList attribute.
@@ -249,7 +248,12 @@ bool PreferHiddenVolumeControls(const Document& document) {
 // If you change this value, then also update the corresponding value in
 // web_tests/media/media-controls.js.
 constexpr base::TimeDelta kTimeWithoutMouseMovementBeforeHidingMediaControls =
+// TODO: Need to add a runtime flag.
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     base::Seconds(3.0);
+#else
+    base::Seconds(2.5);
+#endif
 
 base::TimeDelta GetTimeWithoutMouseMovementBeforeHidingMediaControls() {
   return kTimeWithoutMouseMovementBeforeHidingMediaControls;
@@ -408,7 +412,7 @@ MediaControlsImpl::MediaControlsImpl(HTMLMediaElement& media_element)
       fullscreen_button_(nullptr),
       display_cutout_fullscreen_button_(nullptr),
       download_button_(nullptr),
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
       back_button_(nullptr),
       backward_button_(nullptr),
       extra_videos_panel_(nullptr),
@@ -592,9 +596,8 @@ void MediaControlsImpl::InitializeControls() {
 
   panel_ = MakeGarbageCollected<MediaControlPanelElement>(*this);
 
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser()) {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator()) {
     time_panel_ = MakeGarbageCollected<MediaControlTimePanelElement>(*this);
 
     title_display_ = MakeGarbageCollected<MediaControlTitleDisplayElement>(*this);
@@ -771,7 +774,7 @@ void MediaControlsImpl::PopulatePanel() {
   AttachHoverBackground(overflow_menu_);
 }
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void MediaControlsImpl::PopulateFullscreenPanel() {
   LOG(INFO) << __func__;
   navigation_map_.clear();
@@ -1359,10 +1362,9 @@ void MediaControlsImpl::Reset() {
   UpdateSizingCSSClass();
   OnControlsListUpdated();
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   LOG(INFO) << __func__;
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser())
+  if (IsContentNavigator())
     InitializeFocus();
 #endif
 }
@@ -1426,11 +1428,9 @@ void MediaControlsImpl::MaybeShow() {
 
   if (overlay_play_button_ && !is_paused_for_scrubbing_)
     overlay_play_button_->UpdateDisplayType();
-
   // Only make the controls visible if they won't get hidden by OnTimeUpdate.
-  if (MediaElement().paused() || !ShouldHideMediaControls()) {
+  if (MediaElement().paused() || !ShouldHideMediaControls())
     MakeOpaque();
-  }
   if (loading_panel_)
     loading_panel_->OnControlsShown();
 
@@ -1486,15 +1486,16 @@ void MediaControlsImpl::MaybeShowOverlayPlayButton() {
 }
 
 void MediaControlsImpl::MakeOpaque() {
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser() && MediaElement().IsFullscreen() && vertical_hover_position_ == 0)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator() && MediaElement().IsFullscreen() && vertical_hover_position_ == 0)
     InitializeFocus();
 #endif
   ShowCursor();
   panel_->MakeOpaque();
   MaybeShowOverlayPlayButton();
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   MediaElement().Focus();
+#endif
 }
 
 void MediaControlsImpl::MakeOpaqueFromPointerEvent() {
@@ -1514,9 +1515,8 @@ void MediaControlsImpl::MakeTransparent() {
   if (MediaElement().ShouldShowControls())
     HideCursor();
   panel_->MakeTransparent();
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser()) {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator()) {
     vertical_hover_position_ = 0;
     if (extra_videos_panel_)
       extra_videos_panel_->Hide();
@@ -1721,7 +1721,7 @@ void MediaControlsImpl::ShowOverlayCastButtonIfNeeded() {
 }
 
 void MediaControlsImpl::EnterFullscreen() {
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   LOG(INFO) << __func__;
   is_fullscreen_ = true;
 #endif
@@ -1729,7 +1729,7 @@ void MediaControlsImpl::EnterFullscreen() {
 }
 
 void MediaControlsImpl::ExitFullscreen() {
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   is_fullscreen_ = false;
 #endif
   Fullscreen::ExitFullscreen(GetDocument());
@@ -1758,7 +1758,7 @@ void MediaControlsImpl::UpdateOverflowMenuWanted() const {
     std::make_pair(cast_button_.Get(), false),
     std::make_pair(download_button_.Get(), false),
     std::make_pair(toggle_closed_captions_button_.Get(), false),
-#if !BUILDFLAG(IS_TIZEN_TV)
+#if !defined(TIZEN_CONTENT_NAVIGATOR)
     std::make_pair(playback_speed_button_.Get(), false),
 #endif
   };
@@ -2014,7 +2014,7 @@ void MediaControlsImpl::DefaultEventHandler(Event& event) {
       !IsSpatialNavigationEnabled(GetDocument().GetFrame())) {
     const String& key = keyboard_event->key();
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
     if (IsMediaFullscreenMode()) {
       FullscreenFocusMove(event);
       event.stopImmediatePropagation();
@@ -2063,9 +2063,8 @@ void MediaControlsImpl::HandlePointerEvent(Event* event) {
       // This will fix the issue that when mouse out event happen while video is
       // focused, control never hides.
       if (!MediaElement().paused() && ShouldHideMediaControls(kIgnoreFocus))
-#if BUILDFLAG(IS_TIZEN_TV)
-        // TODO: Should be changed to IsContentNavigator()
-        if (!IsWebBrowser())
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+        if (IsContentNavigator())
           StartHideMediaControlsTimer();
         else
 #endif
@@ -2296,10 +2295,9 @@ void MediaControlsImpl::OnTimeUpdate() {
     MakeOpaque();
     return;
   }
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   // Don't make transparent in content navigator.
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser() && is_fullscreen_)
+  if (IsContentNavigator() && is_fullscreen_)
     return;
 #endif
 
@@ -2313,7 +2311,7 @@ void MediaControlsImpl::OnDurationChange() {
   const double duration = MediaElement().duration();
   bool was_finite_duration = std::isfinite(duration_display_->CurrentValue());
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   if (std::isinf(duration))
     is_live_ = true;
   else
@@ -2414,7 +2412,9 @@ void MediaControlsImpl::OnLoadedMetadata() {
   Reset();
   UpdateCSSClassFromState();
   UpdateActingAsAudioControls();
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   MediaElement().Focus();
+#endif
 }
 
 void MediaControlsImpl::OnEnteredFullscreen() {
@@ -2422,9 +2422,8 @@ void MediaControlsImpl::OnEnteredFullscreen() {
   if (display_cutout_fullscreen_button_)
     display_cutout_fullscreen_button_->SetIsWanted(true);
 
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser()) {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator()) {
     LOG(INFO) << __func__;
     is_fullscreen_ = true;
 
@@ -2461,9 +2460,8 @@ void MediaControlsImpl::OnExitedFullscreen() {
   if (display_cutout_fullscreen_button_)
     display_cutout_fullscreen_button_->SetIsWanted(false);
 
-#if BUILDFLAG(IS_TIZEN_TV)
-  // TODO: Should be changed to IsContentNavigator()
-  if (!IsWebBrowser()) {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  if (IsContentNavigator()) {
     LOG(INFO) << __func__;
     is_fullscreen_ = false;
 
@@ -2652,7 +2650,9 @@ void MediaControlsImpl::NetworkStateChanged() {
       download_button_->ShouldDisplayDownloadButton());
 
   UpdateCSSClassFromState();
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   MediaElement().Focus();
+#endif
 }
 
 void MediaControlsImpl::OpenOverflowMenu() {
@@ -2747,6 +2747,16 @@ MediaControlOverflowMenuButtonElement& MediaControlsImpl::OverflowButton() {
   return *overflow_menu_;
 }
 
+void MediaControlsImpl::OnWaiting() {
+  timeline_->OnMediaStoppedPlaying();
+  UpdateCSSClassFromState();
+}
+
+void MediaControlsImpl::OnLoadedData() {
+  UpdateCSSClassFromState();
+}
+
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 const MediaControlPlaybackSpeedButtonElement&
 MediaControlsImpl::PlaybackSpeedButton() const {
   return *playback_speed_button_;
@@ -2757,19 +2767,8 @@ MediaControlsImpl::PlaybackSpeedButton() {
   return *playback_speed_button_;
 }
 
-void MediaControlsImpl::OnWaiting() {
-  timeline_->OnMediaStoppedPlaying();
-  UpdateCSSClassFromState();
-}
-
-void MediaControlsImpl::OnLoadedData() {
-  UpdateCSSClassFromState();
-}
-
-#if BUILDFLAG(IS_TIZEN_TV)
 bool MediaControlsImpl::IsMediaFullscreenMode() {
-  // TODO: Should be changed to IsContentNavigator()
-  if (IsWebBrowser()) {
+  if (!IsContentNavigator()) {
     return false;
   }
 
@@ -3022,7 +3021,7 @@ void MediaControlsImpl::Trace(Visitor* visitor) const {
   visitor->Trace(display_cutout_fullscreen_button_);
   visitor->Trace(volume_control_container_);
   visitor->Trace(text_track_manager_);
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   visitor->Trace(back_button_);
   visitor->Trace(backward_button_);
   visitor->Trace(extra_container_list_);
index c2b5a891b4f2ec103e61bc8ccd42f112e5088cff..5bacd4d67c1ea819f6e32c2566b38cade9d872c2 100644 (file)
@@ -71,7 +71,7 @@ class MediaControlVolumeControlContainerElement;
 class MediaControlVolumeSliderElement;
 class ShadowRoot;
 class TextTrack;
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 class MediaControlBackButtonElement;
 class MediaControlBackwardButtonElement;
 class MediaControlExternalCaptionDisplayElement;
@@ -174,7 +174,7 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement,
   // Methods used for Download In-product help.
   const MediaControlOverflowMenuButtonElement& OverflowButton() const;
   MediaControlOverflowMenuButtonElement& OverflowButton();
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   const MediaControlPlaybackSpeedButtonElement& PlaybackSpeedButton() const;
   MediaControlPlaybackSpeedButtonElement& PlaybackSpeedButton();
 #endif
@@ -270,7 +270,7 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement,
   void InitializeControls();
   void PopulatePanel();
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void PopulateFullscreenPanel();
   void PopulateExtraVideos();
 
@@ -445,7 +445,7 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement,
       rotate_to_fullscreen_delegate_;
   Member<MediaControlsDisplayCutoutDelegate> display_cutout_delegate_;
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   Member<MediaControlBackButtonElement> back_button_;
   Member<MediaControlBackwardButtonElement> backward_button_;
   Member<MediaControlExtraVideosPanelElement> extra_videos_panel_;
index 3d78ebbf91a0578ea6532abb47862407818a28be..cc9f92a574de3826e65b1178b478bc3a8ba6d7ca 100644 (file)
 #include "third_party/blink/renderer/modules/remoteplayback/remote_playback.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 
-#if BUILDFLAG(IS_TIZEN_TV)
-#include "third_party/blink/public/platform/web_application_type.h"
-#endif
-
 namespace blink {
 
 MediaControlsMediaEventListener::MediaControlsMediaEventListener(
index 179f059c1fc0830c94062caa8c88747abc6a41b8..70961b1f477d74366e723a0cb330e43db67b32f4 100644 (file)
@@ -83,7 +83,7 @@ String MediaControlsResourceLoader::GetUAStyleSheet() {
   return GetMediaControlsCSS() + GetMediaInterstitialsStyleSheet();
 }
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 // static
 String MediaControlsResourceLoader::GetMediaControlsFullscreenCSS() {
   return UncompressResourceAsString(IDR_UASTYLE_MEDIA_CONTROLS_FULLSCREEN_CSS);
index 5ba4995ac6178624113cb5d54fa1bd6b19b71de2..cd3828bb8cb0afdaaffc1c4f8aa665217bb24263 100644 (file)
@@ -40,7 +40,7 @@ class MediaControlsResourceLoader
   static String GetMediaInterstitialsStyleSheet();
 
   String GetUAStyleSheet() override;
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   String GetFullscreenUAStyleSheet() override;
   static String GetFullscreenSheet();
 #endif
@@ -56,7 +56,7 @@ class MediaControlsResourceLoader
 
  private:
   String GetMediaControlsCSS() const;
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   static String GetMediaControlsFullscreenCSS();
 #endif
 
index 5dd75f1c951fb2b245871c214216dfe93f48ab8d..04b42fbb65748728f6852a15e311618e4b88b62c 100644 (file)
@@ -1245,7 +1245,9 @@ void WidgetBase::NotifyTrackInfoToBrowser(int active_track_id,
   widget_host_->NotifyTrackInfoToBrowser(
       active_track_id, WTF::String::FromUTF8(url), WTF::String::FromUTF8(lang));
 }
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void WidgetBase::NotifyHWBack() {
   if (widget_host_)
     widget_host_->NotifyHWBack();
index 247c05884a79332f51477fd92ff2adbfe5ef2646..9370ed78e9f52e9da80757d35ee9a9c5f19893c3 100644 (file)
@@ -276,6 +276,8 @@ class PLATFORM_EXPORT WidgetBase : public mojom::blink::Widget,
   void NotifyTrackInfoToBrowser(int active_track_id,
                                 const std::string& url,
                                 const std::string& lang);
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   void NotifyHWBack();
   void MediaSettingClicked();
 #endif
index e18cde4148ca2a8131edf11b429a1c514942c834..8ae732f60ce1bd75b1fd391b4a436149bcff6c60 100644 (file)
@@ -63,6 +63,7 @@ config("tizen_feature_flags") {
       defines += [
         "OS_TIZEN_TV_PRODUCT",
         "TIZEN_MULTIMEDIA_WEBM_SUPPORT",
+        "TIZEN_CONTENT_NAVIGATOR",
       ]
       if (tizen_version >= 60) {
         defines += [
index f832a5db9cfe6ea51bd95200a38ba50eefc48f2f..24036a8ee68ddb081a854b3a9d7103da044df2e6 100644 (file)
@@ -106,6 +106,8 @@ declare_args() {
 
   tizen_license_tv = false
   tizen_ai = false
+
+  tizen_content_navigator = false
 }
 
 if (use_efl && !build_chrome) {
index 296f4674446d59305c881b3e381b1796b0ac2e43..353f735c09c3a63e8504ec7bd95ba0bc49aa2c18 100755 (executable)
@@ -273,6 +273,11 @@ add_tizen_flags() {
 
   fi
 
+  if [ "$tizen_product_tv" == "true" ]; then
+    ADDITIONAL_GN_PARAMETERS+="tizen_content_navigator=true
+                              "
+  fi
+
   # TODO: generate config for RISCV64 with H264 and HEVC support
   if [ "$tizen_product_tv" == "true" -a "$host_arch" != "riscv64" ]; then
     ADDITIONAL_GN_PARAMETERS+="ffmpeg_branding=\"TizenTV\"
index 3509ab78e2b176eaf84584974172cf3a2ebc7595..0d686a88991e4639eef55978d05161f2bf3cbee7 100644 (file)
@@ -578,18 +578,6 @@ void RWHVAuraCommonHelperEfl::NotifyTrackInfoToBrowser(
   web_contents_->GetDelegate()->NotifySubtitlePlay(active_track_id, url, lang);
 }
 
-void RWHVAuraCommonHelperEfl::NotifyHWBack() {
-  LOG(INFO) << __func__;
-  if (web_contents_)
-    web_contents_->GetDelegate()->NotifyHWBack();
-}
-
-void RWHVAuraCommonHelperEfl::MediaSettingClicked() {
-  LOG(INFO) << __func__;
-  if (web_contents_)
-    web_contents_->GetDelegate()->MediaSettingClicked();
-}
-
 void RWHVAuraCommonHelperEfl::SetTranslatedURL(const std::string& url) {
   if (rwhv_aura_)
     rwhv_aura_->host()->SetTranslatedURL(url);
@@ -800,6 +788,20 @@ ui::ImeStyle RWHVAuraCommonHelperEfl::GetImeStyle() {
 }
 #endif  // IS_TIZEN_TV
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+void RWHVAuraCommonHelperEfl::NotifyHWBack() {
+  LOG(INFO) << __func__;
+  if (web_contents_)
+    web_contents_->GetDelegate()->NotifyHWBack();
+}
+
+void RWHVAuraCommonHelperEfl::MediaSettingClicked() {
+  LOG(INFO) << __func__;
+  if (web_contents_)
+    web_contents_->GetDelegate()->MediaSettingClicked();
+}
+#endif
+
 void RWHVAuraCommonHelperEfl::OnGetMainFrameScrollbarVisible(
     int callback_id, bool visible) {
   web_contents_->GetDelegate()->OnGetMainFrameScrollbarVisible(callback_id,
index d4f515580782ba86f764e19b8beb32b2a6b97c2f..7b0aa7940874a689dee3062f9db1416cc7265b6f 100644 (file)
@@ -161,8 +161,6 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   void NotifyTrackInfoToBrowser(int active_track_id,
                                 const std::string& url,
                                 const std::string& lang);
-  void NotifyHWBack();
-  void MediaSettingClicked();
   void SetPreferSubtitleLang(std::string lang_list);
   void SetIMERecommendedWords(const std::string& recommended_words);
   void SetIMERecommendedWordsType(bool should_enable);
@@ -184,6 +182,10 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   void UpdateCustomCursor(const ui::Cursor& cursor);
   void UpdateCursorName(const WebCursor& cursor);
   ui::ImeStyle GetImeStyle();
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  void NotifyHWBack();
+  void MediaSettingClicked();
 #endif
   void SetCursor(const WebCursor& cursor);
   void UpdateCursor(const WebCursor&);
index aba0f6f73c502ef42d7c58c3050ca0f1a8bddf29..ed0936df66f639ddd718558b1f1c776c813815a7 100644 (file)
@@ -64,4 +64,13 @@ bool IsKnoxBrowser() {
   return tizen_app_id == knox_browser_app_id;
 }
 
+bool IsContentNavigator() {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  return base::CommandLine::ForCurrentProcess()->HasSwitch(
+             switches::kEnableContentNavigator);
+#else
+  return false;
+#endif
+}
+
 }  // namespace blink
index 598395420234a5e191297182f4289dead9152316..284a775bb65439f50e010b87b7c38c315085a74c 100644 (file)
@@ -83,7 +83,7 @@ content::MainFunctionParams CommandLineEfl::GetDefaultPortParams() {
   p_command_line->AppendSwitch(switches::kEnableOffscreenRendering);
   p_command_line->AppendSwitch(switches::kNoUnsandboxedZygote);
 
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
   p_command_line->AppendSwitch(switches::kEnableMediaPlaybackNotification);
 #endif
 
index 030068dd0cb04861334916a2f8662e43bd700380..d372859d0db1b7644b30545be2cf5d94f37a6c69 100644 (file)
@@ -56,4 +56,8 @@ bool IsTIZENWRT() {
   return false;
 #endif
 }
+
+bool IsContentNavigator() {
+  return blink::IsContentNavigator();
+}
 }  // namespace content
index 7283e839d29cf79124c869f53103d41c6c6b4917..05a8a9e2008bd0357c20072a68a76c09e565fb1e 100644 (file)
@@ -25,5 +25,6 @@ bool IsWebBrowser();
 bool IsHbbTV();
 bool IsTIZENWRT();
 bool IsTVPlus();
+bool IsContentNavigator();
 }  // namespace content
 #endif  // APPLICATION_TYPE_H_
index 29d32e37be6ed472cccaf218976036e100b855ae..64d9349118556ba12a9ec7bc115678f1bdc5bccd 100644 (file)
@@ -54,6 +54,10 @@ const char kEnableTrustedPepperPlugins[] = "enable-trusted-pepper-plugins";
 const char kTrustedPepperPluginsSearchPaths[] =
     "trusted-pepper-plugins-search-paths";
 #endif
+
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+const char kEnableContentNavigator[] = "enable-content-navigator";
+#endif
 // Don't dump stuff here, follow the same order as the header.
 
 }  // namespace switches
index 5d63287dd18c5e0e733035bb136c055cb95a9743..aac884f84e8ca85f5058d9af735a04d7e35ccde0 100644 (file)
@@ -63,6 +63,11 @@ CONTENT_EXPORT extern const char kEnableTrustedPepperPlugins[];
 // them with a semicolon (;).
 CONTENT_EXPORT extern const char kTrustedPepperPluginsSearchPaths[];
 #endif
+
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+CONTENT_EXPORT extern const char kEnableContentNavigator[];
+#endif
+
 // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
 // alphabetical order, or in one of the ifdefs (also in order in each section).
 
index 578bcd9527a6fb09a3d9d30669fbd011e76e09bc..4f394a9047395b60f6dbea38904c61651709aab2 100644 (file)
 #include "third_party/blink/public/platform/web_media_player.h"
 #endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+#include "tizen_src/ewk/efl_integration/common/content_switches_efl.h"
+#endif
+
 #if defined(TIZEN_PEPPER_EXTENSIONS)
 #include "efl/window_factory.h"
 #include "ewk/efl_integration/ewk_privilege_checker.h"
@@ -4402,7 +4406,9 @@ void EWebView::NotifyMediaDeviceConnectionChanged(int device_type) {
   SmartCallback<EWebViewCallbacks::DeviceConnectionChanged>().call(
       &device_type);
 }
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void EWebView::NotifyHWBack() {
   LOG(INFO) << __func__;
   SmartCallback<EWebViewCallbacks::HWBackUnhandled>().call();
@@ -4435,6 +4441,19 @@ void EWebView::SetIMERecommendedWords(const char* words) {
   }
   rwhva()->offscreen_helper()->SetIMERecommendedWords(auto_word);
 }
+
+void EWebView::SetContentNavigatorEnabled(bool enabled) {
+  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+  if (enabled)
+    command_line->AppendSwitch(switches::kEnableContentNavigator);
+  else
+    command_line->RemoveSwitch(switches::kEnableContentNavigator);
+}
+
+bool EWebView::GetContentNavigatorEnabled() {
+  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+  return command_line->HasSwitch(switches::kEnableContentNavigator);
+}
 #endif
 
 void EWebView::SetIMEWindow(void* window) {
index e33b276fd1e4adb21a4598a2cc85393aefff7681..0e5b6734588801c8fd0a376c7ae29420687e0aab 100644 (file)
@@ -888,9 +888,6 @@ class EWebView {
       std::array<blink::WebMediaDeviceInfoArray, NUM_MEDIA_DEVICE_TYPES>;
   void OnDeviceListed(const MediaDeviceEnumeration& devices);
   void NotifyMediaDeviceConnectionChanged(int device_type);
-  void NotifyHWBack();
-  void MediaSettingClicked();
-  void SetIMERecommendedWords(const char* words);
 
   void SetTranslatedURL(const char* url);
   void NotifyParentalRatingInfo(const char* info, const char* url);
@@ -909,6 +906,14 @@ class EWebView {
   Ewk_Hardware_Decoders GetBroadcastDecoder() const;
 #endif  // IS_TIZEN_TV
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  void NotifyHWBack();
+  void MediaSettingClicked();
+  void SetIMERecommendedWords(const char* words);
+  void SetContentNavigatorEnabled(bool enabled);
+  bool GetContentNavigatorEnabled();
+#endif
+
 #if defined(TIZEN_PASSKEY_SUPPORT)
   void CancelAuthentication();
 #endif
index bbf8a1256cb392bcca98c08342ca23f6e24791ea..dad6340b031f89fa9ce392b7081a01f36c238306 100644 (file)
@@ -148,12 +148,14 @@ enum CallbackType {
   FirstTimestamp,
   PESData,
   EVENTData,
-  MediaSettingClicked,
 #if defined(TIZEN_MULTIMEDIA_DRMMANAGER_SUPPORT)
   DRMInitData,
   DRMInitComplete,
   DRMError,
 #endif
+#endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  MediaSettingClicked,
 #endif
   OverscrolledLeft,
   OverscrolledRight,
@@ -369,13 +371,15 @@ DECLARE_EWK_VIEW_CALLBACK(SubtitleNotifyData, "on,subtitle,data", void*);
 DECLARE_EWK_VIEW_CALLBACK(FirstTimestamp, "on,dvb,subtitle,timestamp", void*);
 DECLARE_EWK_VIEW_CALLBACK(PESData, "on,dvb,subtitle,data", void*);
 DECLARE_EWK_VIEW_CALLBACK(EVENTData, "update,event,data", void*);
-DECLARE_EWK_VIEW_CALLBACK(MediaSettingClicked, "media,setting,clicked", void);
 #if defined(TIZEN_MULTIMEDIA_DRMMANAGER_SUPPORT)
 DECLARE_EWK_VIEW_CALLBACK(DRMInitData, "drm,init,data", void*);
 DECLARE_EWK_VIEW_CALLBACK(DRMInitComplete, "drm,init,complete", void*);
 DECLARE_EWK_VIEW_CALLBACK(DRMError, "drm,error", void*);
 #endif
 #endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+DECLARE_EWK_VIEW_CALLBACK(MediaSettingClicked, "media,setting,clicked", void);
+#endif
 DECLARE_EWK_VIEW_CALLBACK(OverscrolledLeft, "overscrolled,left", void);
 DECLARE_EWK_VIEW_CALLBACK(OverscrolledRight, "overscrolled,right", void);
 DECLARE_EWK_VIEW_CALLBACK(OverscrolledTop, "overscrolled,top", void);
index 405373252306bca81f7652b442f5100d374d297d..be0b87be278282c8a4b62d7f4ac94cf3abeb6420 100644 (file)
@@ -804,7 +804,7 @@ const char* ewk_view_text_selection_text_get(Evas_Object* view)
 /* LCOV_EXCL_START */
 void ewk_view_focused_input_element_value_set(Evas_Object* ewkView, const char* value)
 {
-#if BUILDFLAG(IS_TIZEN_TV)
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 // FIXME: Due to the restriction on the use of 5.0 rootstraps, it is implemented
 // using ewk_view_focused_input_element_value_set instead.
   EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
@@ -2132,3 +2132,22 @@ void ewk_view_webauthn_cancel(const Evas_Object* view) {
   LOG_EWK_API_MOCKUP("Only for Tizen");
 #endif
 }
+
+void ewk_view_content_navigator_enabled_set(Evas_Object* ewk_view, Eina_Bool enabled) {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl);
+  impl->SetContentNavigatorEnabled(enabled);
+#else
+  LOG_EWK_API_MOCKUP();
+#endif
+}
+
+Eina_Bool ewk_view_content_navigator_enabled_get(const Evas_Object* ewk_view) {
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl, EINA_FALSE);
+  return impl->GetContentNavigatorEnabled();
+#else
+  LOG_EWK_API_MOCKUP();
+  return false;
+#endif
+}
index c1d5e21d8dc0190b69e6df4b515f151dec31fafe..cb339ec04e613201592d55cf4000b5e52ef3bda0 100644 (file)
@@ -1519,6 +1519,26 @@ typedef void (*Ewk_View_Error_Page_Load_Callback)(Evas_Object* o, const Ewk_Erro
  */
 EXPORT_API void ewk_view_error_page_load_callback_set(Evas_Object* ewk_view, Ewk_View_Error_Page_Load_Callback callback, void* user_data);
 
+/**
+ * @brief Set a state of content navigator mode
+ *
+ * @since_tizen 9.0
+ *
+ * @param[in] o the view object.
+ * @param[in] enabled a state to set
+ */
+EXPORT_API void ewk_view_content_navigator_enabled_set(const Evas_Object* ewk_view, Eina_Bool enabled);
+
+/**
+ * @brief Get a state of content navigator mode
+ *
+ * @since_tizen 9.0
+ *
+ * @param[in] o the view object.
+ * @return @c EINA_TRUE if the mode is enabled or @c EINA_FALSE otherwise
+ */
+EXPORT_API Eina_Bool ewk_view_content_navigator_enabled_get(const Evas_Object* ewk_view);
+
 /**
  * @}
  */
index 97e14716ab3f6c6c836e8d5049ad1951ad741cf0..95818bc19f6ffc3319f4c8579593c505f5fafd3e 100644 (file)
@@ -304,7 +304,9 @@ std::string WebContentsDelegateEfl::GetDefaultMediaDeviceID(
       return std::string();
   }
 }
+#endif
 
+#if defined(TIZEN_CONTENT_NAVIGATOR)
 void WebContentsDelegateEfl::NotifyHWBack() {
   web_view_->NotifyHWBack();
 }
index a709d815b5823dbf4e686bd61339b892a5a08621..e95750a6c215837859f7756c3178021201cd1cd7 100644 (file)
@@ -207,8 +207,6 @@ class WebContentsDelegateEfl : public WebContentsDelegate {
 
   int GetBroadcastDecoder() override;
   void NotifyMediaDeviceConnectionChanged(int device_type) override;
-  void NotifyHWBack() override;
-  void MediaSettingClicked() override;
   const std::string& GetActiveDRM() override;
 #if defined(TIZEN_MULTIMEDIA_DRMMANAGER_SUPPORT)
   void NotifyDRMInitData(int init_type,
@@ -218,6 +216,10 @@ class WebContentsDelegateEfl : public WebContentsDelegate {
   void NotifyDRMError(int error_code, const std::string& error_string) override;
 #endif
 #endif
+#if defined(TIZEN_CONTENT_NAVIGATOR)
+  void NotifyHWBack() override;
+  void MediaSettingClicked() override;
+#endif
 
 #if defined(TIZEN_AUTOFILL)
   void UpdateAutofillIfRequired();