[M120 Migration]URL of _Ewk_Error set wrong
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / eweb_view.h
index 5cb5058..08fc8e7 100644 (file)
@@ -316,6 +316,23 @@ class GetMediaDeviceCallback {
 };
 #endif
 
+#if BUILDFLAG(IS_TIZEN_TV)
+class IsVideoPlayingCallback {
+ public:
+  IsVideoPlayingCallback(Ewk_Is_Video_Playing_Callback func, void* user_data)
+      : func_(func), user_data_(user_data) {}
+  void Run(Evas_Object* obj, bool isplaying) {
+    if (func_) {
+      (func_)(obj, isplaying ? EINA_TRUE : EINA_FALSE, user_data_);
+    }
+  }
+
+ private:
+  Ewk_Is_Video_Playing_Callback func_;
+  void* user_data_;
+};
+#endif
+
 class WebViewAsyncRequestHitTestDataCallback;
 class JavaScriptDialogManagerEfl;
 class PermissionPopupManager;
@@ -384,6 +401,8 @@ class EWebView {
                                                int player_id,
                                                const char* url,
                                                const char* mime_type);
+  void SuspendNetworkLoading();
+  void ResumeNetworkLoading();
 #endif // IS_TIZEN_TV
   void SetSessionTimeout(uint64_t timeout);
   double GetTextZoomFactor() const;
@@ -556,10 +575,9 @@ class EWebView {
 
   void SetViewLoadErrorPageCallback(Ewk_View_Error_Page_Load_Callback callback,
                                     void* user_data);
-  const char* InvokeViewLoadErrorPageCallback(
-      const GURL& url,
-      int error_code,
-      const std::string& error_description);
+  const char* InvokeViewLoadErrorPageCallback(const GURL& url,
+                                              int error_code,
+                                              bool is_cancellation);
   bool IsLoadErrorPageCallbackSet() const;
   void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
                                    void* user_data);
@@ -736,6 +754,9 @@ class EWebView {
   bool EdgeScrollBy(int delta_x, int delta_y);
   void GetMousePosition(gfx::Point&);
   void InvokeEdgeScrollByCallback(const gfx::Point&, bool);
+  // notify web browser video playing status
+  bool IsVideoPlaying(Ewk_Is_Video_Playing_Callback callback, void* user_data);
+  void InvokeIsVideoPlayingCallback(bool is_playing, int callback_id);
 #endif
 
   void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
@@ -784,12 +805,32 @@ class EWebView {
                                uint32_t current);
   void SetHighBitRate(Eina_Bool is_high_bitrate);
   bool IsHighBitRate() const { return is_high_bitrate_; }
-
+  void NotifyFirstTimeStamp(unsigned long long timestamp,
+                            int time_base_num,
+                            int time_base_den);
+  void NotifyPESData(const std::string& buf,
+                     unsigned int len,
+                     int media_position);
+  void SetPreferSubtitleLang(const char* lang_list);
+  void NotifySubtitleState(int state, double time_stamp);
+  void NotifySubtitlePlay(int active_track_id,
+                          const char* url,
+                          const char* lang);
+  void NotifySubtitleData(int track_id,
+                          double time_stamp,
+                          const std::string& data,
+                          unsigned int size);
+  void UpdateCurrentTime(double current_time);
+  void UpdateEventData(void* data);
+  double GetCurrentTime() { return current_time_; }
   void GetMediaDeviceList(Ewk_Media_Device_List_Get_Callback callback,
                           void* userData);
   using MediaDeviceEnumeration =
       std::array<blink::WebMediaDeviceInfoArray, NUM_MEDIA_DEVICE_TYPES>;
   void OnDeviceListed(const MediaDeviceEnumeration& devices);
+  void SetTranslatedURL(const char* url);
+  void NotifyParentalRatingInfo(const char* info, const char* url);
+  void SetParentalRatingResult(const char* info, bool is_pass);
 #endif  // IS_TIZEN_TV
 
   void SetDidChangeThemeColorCallback(
@@ -896,6 +937,10 @@ class EWebView {
       MHTMLCallbackDetails;
   base::IDMap<MHTMLCallbackDetails*> mhtml_callback_map_;
 
+#if BUILDFLAG(IS_TIZEN_TV)
+  base::IDMap<IsVideoPlayingCallback*> is_video_playing_callback_map_;
+#endif
+
   typedef WebViewCallback<Ewk_View_Main_Frame_Scrollbar_Visible_Get_Callback,
                           bool>
       MainFrameScrollbarVisibleGetCallback;
@@ -997,6 +1042,7 @@ class EWebView {
     kPlaybackFinish,
     kPlaybackStop,
   };
+  double current_time_ = 0.0;
 #endif
 
   std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;