IPC_MESSAGE_ROUTED0(WrtViewMsg_SuspendScheduledTask)
IPC_MESSAGE_ROUTED0(WrtViewMsg_ResumeScheduledTasks)
+#if defined(TIZEN_VIDEO_HOLE)
+IPC_MESSAGE_ROUTED1(WrtViewMsg_EnableVideoHole,
+ bool)
+#endif
IPC_MESSAGE_HANDLER(WrtViewMsg_SetLongPolling, OnSetLongPolling)
IPC_MESSAGE_HANDLER(WrtViewMsg_SuspendScheduledTask, OnSuspendScheduledTasks)
IPC_MESSAGE_HANDLER(WrtViewMsg_ResumeScheduledTasks, OnResumeScheduledTasks)
+#if defined(TIZEN_VIDEO_HOLE)
+ IPC_MESSAGE_HANDLER(WrtViewMsg_EnableVideoHole, OnEnableVideoHole)
+#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
view->setLongPollingGlobalTimeout(timeout);
}
+#if defined(TIZEN_VIDEO_HOLE)
+void AtomRenderViewObserver::OnEnableVideoHole(bool is_enabled) {
+ blink::WebView* view = render_view()->GetWebView();
+ if (view)
+ view->setVideoHoleForRender(is_enabled);
+}
+#endif
+
} // namespace atom
void SetContentSecurityPolicy(blink::WebLocalFrame* frame);
void OnSetLongPolling(unsigned long);
+#if defined(TIZEN_VIDEO_HOLE)
+ void OnEnableVideoHole(bool is_enabled);
+#endif
+
AtomRendererClient* renderer_client_;
// Whether the document object has been created.
}],
],
}, # capi-appfw-application
+ {
+ 'target_name': 'capi-media-player',
+ 'type': 'none',
+ 'conditions': [
+ ['tizen_product_tv==1', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags capi-media-player)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other capi-media-player)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l capi-media-player)',
+ ],
+ },
+ }],
+ ],
+ }, # capi-media-player
],
}
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(ttrace)
%if "%{?TIZEN_PRODUCT_TV}" == "1"
+BuildRequires: pkgconfig(capi-media-player)
BuildRequires: pkgconfig(vd-win-util)
%endif
BuildRequires: pkgconfig(wgt-manifest-handlers)
*/
#include "atom/common/api/api_messages.h"
-#include "base/logging.h"
#include "common/string_utils.h"
#include "tizen/browser/tizen_browser_parts.h"
+#if defined(TIZEN_VIDEO_HOLE)
+#include "atom/browser/native_window_efl.h"
+#include "atom/browser/window_list.h"
+#include "media/base/tizen/media_player_efl.h"
+#endif
+
namespace tizen {
namespace {
csp_report_rule = csp_report_rule_;
}
+#if defined(TIZEN_VIDEO_HOLE)
+void TizenBrowserParts::EnableVideoHole(content::RenderViewHost* render_view_host) {
+ Evas_Object* window_obj =
+ static_cast<atom::NativeWindowEfl*>(atom::WindowList::GetLastWindow())
+ ->evas_object();
+
+ // arg1 -> Evas object,
+ // arg2 -> 0 : WINDOWLESS_MODE_NORMAL,
+ // 1 : WINDOWLESS_MODE_FULL_SCREEN
+ media::MediaPlayerEfl::SetSharedVideoWindowHandle(window_obj, 0);
+
+ // For TV video hole is enabled by default.
+ render_view_host->Send(
+ new WrtViewMsg_EnableVideoHole(render_view_host->GetRoutingID(), true));
+}
+#endif
+
void TizenBrowserParts::SetLongPollingTimeout(content::RenderViewHost* rvh) {
auto setting = app_data_->setting_info();
if (setting.get() != NULL &&
void TizenBrowserParts::RenderViewCreated(content::RenderViewHost* render_view_host) {
SetLongPollingTimeout(render_view_host);
+#if defined(TIZEN_VIDEO_HOLE)
+ EnableVideoHole(render_view_host);
+#endif
}
void TizenBrowserParts::Suspend(content::RenderViewHost* rvh) {
#include "content/public/browser/render_view_host.h"
#include "tizen/common/app_control.h"
#include "tizen/common/application_data.h"
-#include "tizen/common/resource_manager.h"
#include "tizen/common/locale_manager.h"
+#include "tizen/common/resource_manager.h"
namespace tizen {
void RenderViewCreated(content::RenderViewHost* render_view_host);
void Suspend(content::RenderViewHost* rvh);
void Resume(content::RenderViewHost* rvh);
- void GetCSP(std::string &csp_rule, std::string &csp_report_rule);
+ void GetCSP(std::string& csp_rule, std::string& csp_report_rule);
bool ShouldAllowNavigation(const std::string &url);
void Initialize();
virtual ~TizenBrowserParts() {}
private:
+#if defined(TIZEN_VIDEO_HOLE)
+ void EnableVideoHole(content::RenderViewHost* render_view_host);
+#endif
+
void SetLongPollingTimeout(content::RenderViewHost* render_view_host);
common::ApplicationData* app_data_;
'target_defaults': {
'defines': [
'OS_TIZEN_TV_PRODUCT',
+ 'TIZEN_VIDEO_HOLE',
],
},
}], # tizen_product_tv==1
}],
['tizen_product_tv==1', {
'dependencies': [
+ # `media_player_efl.h` internally includes `player.h`.
+ '<(DEPTH)/efl/build/system.gyp:capi-media-player',
'<(DEPTH)/efl/build/system.gyp:vd-win-util',
],
}],