#if BUILDFLAG(IS_TIZEN)
NewWindowNavigationPolicyDecision,
#endif // IS_TIZEN
+#if BUILDFLAG(IS_TIZEN_TV)
+ HoverOverLink,
+ HoverOutLink,
+#endif
URIChanged,
DidNotAllowScript,
NotificationPermissionReply,
DECLARE_EWK_VIEW_CALLBACK(NewWindowNavigationPolicyDecision, "policy,decision,new,window", Ewk_Navigation_Policy_Decision*);
#endif // IS_TIZEN
+#if BUILDFLAG(IS_TIZEN_TV)
+DECLARE_EWK_VIEW_CALLBACK(HoverOverLink, "hover,over,link", const char*);
+DECLARE_EWK_VIEW_CALLBACK(HoverOutLink, "hover,out,link", const char*);
+#endif
DECLARE_EWK_VIEW_CALLBACK(ContentsSizeChanged, "contents,size,changed", void);
DECLARE_EWK_VIEW_CALLBACK(MenuBarVisible, "menubar,visible", bool*);
DECLARE_EWK_VIEW_CALLBACK(StatusBarVisible, "statusbar,visible", bool*);
}
}
+#if BUILDFLAG(IS_TIZEN_TV)
+void WebContentsDelegateEfl::UpdateTargetURL(WebContents* /*source*/,
+ const GURL& url) {
+ std::string absolute_link_url(url.spec());
+ if (absolute_link_url == last_hovered_url_)
+ return;
+
+ if (absolute_link_url.empty()) {
+ // If length is 0, it is not link. send "hover,out,link" callback with the
+ // original hovered URL.
+ web_view_->SmartCallback<EWebViewCallbacks::HoverOutLink>().call(
+ last_hovered_url_.c_str());
+ } else {
+ web_view_->SmartCallback<EWebViewCallbacks::HoverOverLink>().call(
+ absolute_link_url.c_str());
+ }
+
+ // Update latest hovered url.
+ last_hovered_url_ = absolute_link_url;
+}
+#endif
+
void WebContentsDelegateEfl::OnGetMainFrameScrollbarVisible(int callback_id,
bool visible) {
web_view_->InvokeMainFrameScrollbarVisibleCallback(callback_id, visible);
MediaResponseCallback callback);
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+ void UpdateTargetURL(WebContents* source, const GURL& url) override;
+#endif
+
#if defined(TIZEN_AUTOFILL_SUPPORT)
void UpdateAutofillIfRequired();
#endif
EWebView* web_view_;
bool is_fullscreen_;
WebContents& web_contents_;
+#if BUILDFLAG(IS_TIZEN_TV)
+ std::string last_hovered_url_;
+#endif
bool did_render_frame_ = false;
bool did_first_visually_non_empty_paint_ = false;