#include "public/ewk_value_product.h"
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "third_party/blink/public/common/mediastream/media_devices.h"
+#endif
+
namespace aura {
namespace client {
class FocusClient;
class Ewk_Context;
class _Ewk_Quota_Permission_Request;
+#if BUILDFLAG(IS_TIZEN_TV)
+struct _Ewk_File_Chooser_Request;
+#endif
+
#if defined(TIZEN_ATK_SUPPORT)
class EWebAccessibility;
#endif
void* user_data_;
};
+#if BUILDFLAG(IS_TIZEN_TV)
+class GetMediaDeviceCallback {
+ public:
+ GetMediaDeviceCallback() : func_(nullptr), user_data_(nullptr) {}
+
+ void Set(Ewk_Media_Device_List_Get_Callback func, void* user_data) {
+ func_ = func;
+ user_data_ = user_data;
+ }
+
+ void Run(EwkMediaDeviceInfo* device_list, int size) {
+ if (func_) {
+ (func_)(device_list, size, user_data_);
+ }
+ }
+
+ private:
+ Ewk_Media_Device_List_Get_Callback func_;
+ void* user_data_;
+};
+#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;
void Stop();
#if BUILDFLAG(IS_TIZEN_TV)
void SetFloatVideoWindowState(bool enabled);
+ void NotifyDownloadableFontInfo(const char* scheme_id_uri,
+ const char* value,
+ const char* data,
+ int type);
+ std::vector<std::string> NotifyPlaybackState(int state,
+ 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;
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);
void GetSessionData(const char** data, unsigned* length) const;
bool RestoreFromSessionData(const char* data, unsigned length);
- void ShowFileChooser(content::RenderFrameHost* render_frame_host,
+ void ShowFileChooser(scoped_refptr<content::FileSelectListener> listener,
const blink::mojom::FileChooserParams&);
void SetBrowserFont();
bool IsDragging() const;
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,
void NotifyMediaStateChanged(uint32_t type,
uint32_t previous,
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(
void InitInspectorServer();
void RunPendingSetFocus(Eina_Bool focus);
-#endif
-
-#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
- static void cameraResultCb(service_h request,
- service_h reply,
- service_result_e result,
- void* data);
-
- bool LaunchCamera(std::u16string mimetype);
+ void SetFocusInternal(Eina_Bool focus);
#endif
JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
std::string selected_text_cached_;
std::unique_ptr<content::ContextMenuControllerEfl> context_menu_;
-#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
+#if BUILDFLAG(IS_TIZEN_TV)
+ std::unique_ptr<_Ewk_File_Chooser_Request> file_chooser_request_;
+#else
std::unique_ptr<content::FileChooserControllerEfl> file_chooser_;
#endif
std::unique_ptr<content::PopupControllerEfl> popup_controller_;
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;
base::IDMap<BackgroundColorGetCallback*> background_color_get_callback_map_;
+#if BUILDFLAG(IS_TIZEN_TV)
+ GetMediaDeviceCallback device_cb_;
+#endif
+
gfx::Size contents_size_;
double progress_;
mutable std::string title_;
bool use_early_rwi_;
bool rwi_info_showed_;
GURL rwi_gurl_;
+ bool is_high_bitrate_ = false;
base::OnceClosure pending_setfocus_closure_;
+
+ enum PlaybackState {
+ kPlaybackLoad = 0,
+ // kPlaybackReady: player with both audio and video starts prepare and will
+ // acquire audio and video resources (if they are not already taken)
+ kPlaybackReady,
+ kPlaybackStart,
+ kPlaybackFinish,
+ kPlaybackStop,
+ };
+ double current_time_ = 0.0;
#endif
std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;
#endif
Ecore_Timer* delayed_show_context_menu_timer_ = nullptr;
+ base::WeakPtrFactory<EWebView> weak_factory_{this};
};
const unsigned int g_default_tilt_motion_sensitivity = 3;