[M120 Migration][hbbtv] Audio tracks count notification
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / web_contents_delegate_efl.cc
index 6c4c6e3..01f2d66 100644 (file)
@@ -823,6 +823,13 @@ void WebContentsDelegateEfl::DidEdgeScrollBy(const gfx::Point& offset,
     web_view_->InvokeEdgeScrollByCallback(offset, handled);
 }
 
+void WebContentsDelegateEfl::MoveFocusToBrowser(int direction) {
+  if (web_view_) {
+    web_view_->SmartCallback<EWebViewCallbacks::AtkKeyEventNotHandled>().call(
+        &direction);
+  }
+}
+
 void WebContentsDelegateEfl::WillDraw(int new_rotation,
                                       gfx::Size frame_data_output_size) {
   if (web_view_) {
@@ -881,6 +888,15 @@ void WebContentsDelegateEfl::NotifyPlaybackState(int state,
   }
 }
 
+void WebContentsDelegateEfl::NotifyAudioTracksCount(
+    int player_id,
+    unsigned audio_tracks_count) {
+  if (web_view_)
+    web_view_->NotifyAudioTracksCount(player_id, audio_tracks_count);
+  else
+    LOG(INFO) << "web_view_ is null";
+}
+
 void WebContentsDelegateEfl::OnIsVideoPlayingGet(bool is_playing,
                                                  int callback_id) {
   if (web_view_)
@@ -897,4 +913,16 @@ void WebContentsDelegateEfl::VideoPlayingStatusReceived(bool is_playing,
     LOG(INFO) << "web_view_ is null";
 }
 #endif
+
+void WebContentsDelegateEfl::UpdateTooltipUnderCursor(
+    const std::u16string& text) {
+  std::string tooltip = base::UTF16ToUTF8(text);
+  LOG(INFO) << __func__ << " " << tooltip.c_str();
+  if (tooltip.empty()) {
+    web_view_->SmartCallback<EWebViewCallbacks::TooltipTextUnset>().call();
+  } else {
+    web_view_->SmartCallback<EWebViewCallbacks::TooltipTextSet>().call(
+        tooltip.c_str());
+  }
+}
 }  // namespace content