1 // Copyright 2014 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #if !defined(EWK_BRINGUP) // FIXME: m67 bringup
9 // FIXME: appfw/app_service.h is no more in Tizen 2.3, figure out what to
11 #include <appcore-agent/service_app.h>
20 #include "base/callback.h"
21 #include "base/containers/id_map.h"
22 #include "base/synchronization/waitable_event.h"
23 #include "browser/input_picker/input_picker.h"
24 #include "browser/selectpicker/popup_picker.h"
25 #include "content/browser/date_time_chooser_efl.h"
26 #include "content/browser/renderer_host/event_with_latency_info.h"
27 #include "content/browser/selection/selection_controller_efl.h"
28 #include "content/browser/web_contents/web_contents_view_aura.h"
29 #include "content/browser/web_contents/web_contents_view_aura_helper_efl.h"
30 #include "content/public/browser/context_menu_params.h"
31 #include "content/public/browser/navigation_controller.h"
32 #include "content/public/browser/quota_permission_context.h"
33 #include "content/public/browser/web_contents_delegate.h"
34 #include "content/public/browser/web_contents_efl_delegate.h"
35 #include "content/public/common/input_event_ack_state.h"
36 #include "content_browser_client_efl.h"
37 #include "context_menu_controller_efl.h"
38 #include "eweb_context.h"
39 #include "eweb_view_callbacks.h"
40 #include "file_chooser_controller_efl.h"
41 #include "permission_popup_manager.h"
42 #include "popup_controller_efl.h"
43 #include "private/ewk_auth_challenge_private.h"
44 #include "private/ewk_back_forward_list_private.h"
45 #include "private/ewk_history_private.h"
46 #include "private/ewk_hit_test_private.h"
47 #include "private/ewk_settings_private.h"
48 #include "private/ewk_web_application_icon_data_private.h"
49 #include "public/ewk_hit_test_internal.h"
50 #include "public/ewk_touch_internal.h"
51 #include "public/ewk_view_product.h"
52 #include "scroll_detector.h"
53 #include "third_party/blink/public/common/context_menu_data/menu_item_info.h"
54 #include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h"
55 #include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h"
56 #include "ui/aura/window_tree_host.h"
57 #include "ui/gfx/geometry/point.h"
58 #include "ui/gfx/geometry/size.h"
59 #include "web_contents_delegate_efl.h"
64 class WindowParentingClient;
73 class RenderFrameHost;
75 class RenderWidgetHostViewAura;
76 class WebContentsDelegateEfl;
77 class WebContentsViewAura;
78 class ContextMenuControllerEfl;
79 class PopupControllerEfl;
81 class GinNativeBridgeDispatcherHost;
82 class NavigationHandle;
86 class _Ewk_App_Control;
87 class _Ewk_Policy_Decision;
90 class WebViewEvasEventHandler;
91 class _Ewk_Quota_Permission_Request;
93 template <typename CallbackPtr, typename CallbackParameter>
94 class WebViewCallback {
96 WebViewCallback() { Set(nullptr, nullptr); }
98 void Set(CallbackPtr cb, void* data) {
103 bool IsCallbackSet() const { return callback_; }
105 Eina_Bool Run(Evas_Object* webview,
106 CallbackParameter param,
107 Eina_Bool* callback_result) {
108 CHECK(callback_result);
109 if (IsCallbackSet()) {
110 *callback_result = callback_(webview, param, user_data_);
116 void Run(Evas_Object* webview, CallbackParameter param) {
118 callback_(webview, param, user_data_);
122 CallbackPtr callback_;
126 template <typename CallbackReturnValue,
127 typename CallbackPtr,
128 typename CallbackParameter>
129 class WebViewCallbackWithReturnValue {
131 WebViewCallbackWithReturnValue() { Set(nullptr, nullptr); }
133 void Set(CallbackPtr cb, void* data) {
138 /* LCOV_EXCL_START */
139 bool IsCallbackSet() const { return callback_; }
141 CallbackReturnValue Run(Evas_Object* webview, CallbackParameter param) {
143 return callback_(webview, param, user_data_);
150 CallbackPtr callback_;
154 template <typename CallbackPtr, typename... CallbackParameter>
155 class WebViewExceededQuotaCallback {
157 WebViewExceededQuotaCallback() { Set(nullptr, nullptr); }
159 void Set(CallbackPtr cb, void* data) {
164 bool IsCallbackSet() const { return callback_; }
166 /* LCOV_EXCL_START */
167 void Run(Evas_Object* webview, CallbackParameter... param) {
169 callback_(webview, param..., user_data_);
174 CallbackPtr callback_;
178 class BackgroundColorGetCallback {
180 BackgroundColorGetCallback(Ewk_View_Background_Color_Get_Callback func,
182 : func_(func), user_data_(user_data) {}
184 void Run(Evas_Object* webview, int r, int g, int b, int a) {
186 func_(webview, r, g, b, a, user_data_);
190 Ewk_View_Background_Color_Get_Callback func_;
194 class WebApplicationIconUrlGetCallback {
196 WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func,
198 : func_(func), user_data_(user_data) {}
199 void Run(const std::string& url) {
201 (func_)(url.c_str(), user_data_);
206 Ewk_Web_App_Icon_URL_Get_Callback func_;
210 class WebApplicationIconUrlsGetCallback {
212 WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func,
214 : func_(func), user_data_(user_data) {}
215 void Run(const std::map<std::string, std::string>& urls) {
217 Eina_List* list = NULL;
218 for (std::map<std::string, std::string>::const_iterator it = urls.begin();
219 it != urls.end(); ++it) {
220 _Ewk_Web_App_Icon_Data* data =
221 ewkWebAppIconDataCreate(it->first, it->second);
222 list = eina_list_append(list, data);
224 (func_)(list, user_data_);
229 Ewk_Web_App_Icon_URLs_Get_Callback func_;
233 class WebApplicationCapableGetCallback {
235 WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func,
237 : func_(func), user_data_(user_data) {}
238 void Run(bool capable) {
240 (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
245 Ewk_Web_App_Capable_Get_Callback func_;
249 class DidChangeThemeColorCallback {
251 DidChangeThemeColorCallback() : callback_(nullptr), user_data_(nullptr) {}
252 void Set(Ewk_View_Did_Change_Theme_Color_Callback callback, void* user_data) {
253 callback_ = callback;
254 user_data_ = user_data;
256 void Run(Evas_Object* o, const SkColor& color) {
258 callback_(o, SkColorGetR(color), SkColorGetG(color), SkColorGetB(color),
259 SkColorGetA(color), user_data_);
263 Ewk_View_Did_Change_Theme_Color_Callback callback_;
267 class WebViewAsyncRequestHitTestDataCallback;
268 class JavaScriptDialogManagerEfl;
269 class PermissionPopupManager;
273 static EWebView* FromEvasObject(Evas_Object* eo);
275 EWebView(Ewk_Context*, Evas_Object* smart_object);
278 // initialize data members and activate event handlers.
279 // call this once after created and before use
282 bool CreateNewWindow(
283 content::WebContentsEflDelegate::WebContentsCreateCallback);
284 static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
286 content::WebContentsViewAura* wcva() const;
287 content::RenderWidgetHostViewAura* rwhva() const;
288 Ewk_Context* context() const { return context_.get(); }
289 Evas_Object* evas_object() const { return evas_object_; }
290 Evas_Object* native_view() const { return native_view_; }
291 Evas_Object* GetElmWindow() const;
292 Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
293 PermissionPopupManager* GetPermissionPopupManager() const {
294 return permission_popup_manager_.get();
297 content::WebContents& web_contents() const { return *web_contents_.get(); }
299 template <EWebViewCallbacks::CallbackType callbackType>
300 EWebViewCallbacks::CallBack<callbackType> SmartCallback() const {
301 return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
304 void set_magnifier(bool status);
307 void SetURL(const GURL& url, bool from_api = false);
308 const GURL& GetURL() const;
309 const GURL& GetOriginalURL() const;
311 void ReloadBypassingCache();
312 Eina_Bool CanGoBack();
313 Eina_Bool CanGoForward();
314 Eina_Bool HasFocus() const;
315 void SetFocus(Eina_Bool focus);
317 Eina_Bool GoForward();
321 void SetSessionTimeout(uint64_t timeout);
322 double GetTextZoomFactor() const;
323 void SetTextZoomFactor(double text_zoom_factor);
324 double GetPageZoomFactor() const;
325 void SetPageZoomFactor(double page_zoom_factor);
326 void ExecuteEditCommand(const char* command, const char* value);
327 void SetOrientation(int orientation);
328 int GetOrientation();
329 bool TouchEventsEnabled() const;
330 void SetTouchEventsEnabled(bool enabled);
331 bool MouseEventsEnabled() const;
332 void SetMouseEventsEnabled(bool enabled);
333 void HandleTouchEvents(Ewk_Touch_Event_Type type,
334 const Eina_List* points,
335 const Evas_Modifier* modifiers);
338 bool ExecuteJavaScript(const char* script,
339 Ewk_View_Script_Execute_Callback callback,
341 bool SetUserAgent(const char* userAgent);
342 bool SetUserAgentAppName(const char* application_name);
343 #if BUILDFLAG(IS_TIZEN)
344 bool SetPrivateBrowsing(bool incognito);
345 bool GetPrivateBrowsing() const;
347 const char* GetUserAgent() const;
348 const char* GetUserAgentAppName() const;
349 const char* CacheSelectedText();
350 Ewk_Settings* GetSettings() { return settings_.get(); }
351 _Ewk_Frame* GetMainFrame();
352 void UpdateWebKitPreferences();
353 void LoadHTMLString(const char* html,
354 const char* base_uri,
355 const char* unreachable_uri);
356 void LoadPlainTextString(const char* plain_text);
357 void LoadData(const char* data,
359 const char* mime_type,
360 const char* encoding,
361 const char* base_uri,
362 const char* unreachable_uri = NULL);
364 void InvokeLoadError(const GURL& url, int error_code, bool is_cancellation);
366 void SetViewAuthCallback(Ewk_View_Authentication_Callback callback,
368 void InvokeAuthCallback(LoginDelegateEfl* login_delegate,
370 const std::string& realm);
371 void Find(const char* text, Ewk_Find_Options);
372 void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
373 void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
374 void HandlePopupMenu(std::vector<blink::mojom::MenuItemPtr> items,
377 void HidePopupMenu();
378 void UpdateFormNavigation(int formElementCount,
379 int currentNodeIndex,
382 void FormNavigate(bool direction);
383 bool FormIsNavigating() const { return formIsNavigating_; }
384 void SetFormIsNavigating(bool formIsNavigating);
385 Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex);
386 Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
387 Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
388 void PopupMenuClose();
389 void HandleLongPressGesture(const content::ContextMenuParams&);
390 void ShowContextMenu(const content::ContextMenuParams&);
391 void CancelContextMenu(int request_id);
392 void SetScale(double scale_factor);
393 void SetScaleChangedCallback(Ewk_View_Scale_Changed_Callback callback,
396 bool GetScrollPosition(int* x, int* y) const;
397 void SetScroll(int x, int y);
398 void UrlRequestSet(const char* url,
399 content::NavigationController::LoadURLType loadtype,
403 content::SelectionControllerEfl* GetSelectionController() const;
404 content::PopupControllerEfl* GetPopupController() const {
405 return popup_controller_.get();
407 ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
408 void MoveCaret(const gfx::Point& point);
409 void SelectLinkText(const gfx::Point& touch_point);
410 bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
411 Eina_Bool ClearSelection();
413 // Callback OnCopyFromBackingStore will be called once we get the snapshot
415 void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
420 void RenderViewReady();
423 * Creates a snapshot of given rectangle from EWebView
425 * @param rect rectangle of EWebView which will be taken into snapshot
426 * @param scale_factor scale factor
427 * @return created snapshot or NULL if error occured.
428 * @note ownership of snapshot is passed to caller
430 Evas_Object* GetSnapshot(Eina_Rectangle rect, float scale_factor);
432 bool GetSnapshotAsync(Eina_Rectangle rect,
433 Ewk_Web_App_Screenshot_Captured_Callback callback,
436 void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision,
438 void InvokePolicyNavigationCallback(const NavigationPolicyParams& params,
440 void UseSettingsFont();
442 _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
443 Eina_Bool AsyncRequestHitTestDataAt(int x,
445 Ewk_Hit_Test_Mode mode,
446 Ewk_View_Hit_Test_Request_Callback,
448 _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x,
450 Ewk_Hit_Test_Mode mode);
451 Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
454 Ewk_Hit_Test_Mode mode,
455 Ewk_View_Hit_Test_Request_Callback,
457 void DispatchAsyncHitTestData(const Hit_Test_Params& params,
459 void UpdateHitTestData(const Hit_Test_Params& params);
461 int current_find_request_id() const { return current_find_request_id_; }
462 bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
463 void InvokePlainTextGetCallback(const std::string& content_text,
464 int plain_text_get_callback_id);
465 int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback,
467 void SetViewGeolocationPermissionCallback(
468 Ewk_View_Geolocation_Permission_Callback callback,
470 bool InvokeViewGeolocationPermissionCallback(
471 _Ewk_Geolocation_Permission_Request*
472 geolocation_permission_request_context,
474 void SetViewUserMediaPermissionCallback(
475 Ewk_View_User_Media_Permission_Callback callback,
477 bool InvokeViewUserMediaPermissionCallback(
478 _Ewk_User_Media_Permission_Request* user_media_permission_request_context,
480 void SetViewUserMediaPermissionQueryCallback(
481 Ewk_View_User_Media_Permission_Query_Callback callback,
483 Ewk_User_Media_Permission_Query_Result
484 InvokeViewUserMediaPermissionQueryCallback(
485 _Ewk_User_Media_Permission_Query* user_media_permission_query_context);
486 void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
488 bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction,
490 void DidChangeContentsSize(int width, int height);
491 const Eina_Rectangle GetContentsSize() const;
492 void GetScrollSize(int* w, int* h);
494 void SetProgressValue(double progress);
495 double GetProgressValue();
496 const char* GetTitle();
497 bool SaveAsPdf(int width, int height, const std::string& file_name);
498 void BackForwardListClear();
499 _Ewk_Back_Forward_List* GetBackForwardList() const;
500 void InvokeBackForwardListChangedCallback();
501 _Ewk_History* GetBackForwardHistory() const;
502 bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback,
504 bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback,
506 bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback,
508 void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
509 void InvokeWebAppIconUrlGetCallback(const std::string& iconUrl,
511 void InvokeWebAppIconUrlsGetCallback(
512 const std::map<std::string, std::string>& iconUrls,
514 void SetNotificationPermissionCallback(
515 Ewk_View_Notification_Permission_Callback callback,
517 bool IsNotificationPermissionCallbackSet() const;
518 bool InvokeNotificationPermissionCallback(
519 Ewk_Notification_Permission_Request* request);
521 bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
522 void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
523 bool SavePageAsMHTML(const std::string& path,
524 Ewk_View_Save_Page_Callback callback,
527 void ExitFullscreen();
529 void DidChangePageScaleFactor(double scale_factor);
530 void SetScaledContentsSize();
531 void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
533 void JavaScriptAlertReply();
534 void SetJavaScriptConfirmCallback(
535 Ewk_View_JavaScript_Confirm_Callback callback,
537 void JavaScriptConfirmReply(bool result);
538 void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback,
540 void JavaScriptPromptReply(const char* result);
541 void set_renderer_crashed();
542 void GetPageScaleRange(double* min_scale, double* max_scale);
543 void SetDrawsTransparentBackground(bool enabled);
544 bool GetBackgroundColor(Ewk_View_Background_Color_Get_Callback callback,
546 void OnGetBackgroundColor(int callback_id, SkColor bg_color);
548 void GetSessionData(const char** data, unsigned* length) const;
549 bool RestoreFromSessionData(const char* data, unsigned length);
550 void ShowFileChooser(content::RenderFrameHost* render_frame_host,
551 const blink::mojom::FileChooserParams&);
552 void SetBrowserFont();
553 bool IsDragging() const;
555 void RequestColorPicker(int r, int g, int b, int a);
556 bool SetColorPickerColor(int r, int g, int b, int a);
557 void InputPickerShow(ui::TextInputType input_type,
559 content::DateTimeChooserEfl* date_time_chooser);
561 void ShowContentsDetectedPopup(const char*);
563 // Returns TCP port number with Inspector, or 0 if error.
564 int StartInspectorServer(int port = 0);
565 bool StopInspectorServer();
567 void LoadNotFoundErrorPage(const std::string& invalidUrl);
568 static std::string GetPlatformLocale();
569 bool GetLinkMagnifierEnabled() const;
570 void SetLinkMagnifierEnabled(bool enabled);
572 bool GetHorizontalPanningHold() const;
573 void SetHorizontalPanningHold(bool hold);
574 bool GetVerticalPanningHold() const;
575 void SetVerticalPanningHold(bool hold);
577 void SetQuotaPermissionRequestCallback(
578 Ewk_Quota_Permission_Request_Callback callback,
580 void InvokeQuotaPermissionRequest(
581 _Ewk_Quota_Permission_Request* request,
582 content::QuotaPermissionContext::PermissionCallback cb);
583 void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
585 void QuotaRequestCancel(const _Ewk_Quota_Permission_Request* request);
586 #if !defined(EWK_BRINGUP) // FIXME: m67 bringup
587 void SetViewMode(blink::WebViewMode view_mode);
589 gfx::Point GetContextMenuPosition() const;
591 content::ContextMenuControllerEfl* GetContextMenuController() {
592 return context_menu_.get();
594 void ResetContextMenuController();
595 Eina_Bool AddJavaScriptMessageHandler(Evas_Object* view,
596 Ewk_View_Script_Message_Cb callback,
599 content::GinNativeBridgeDispatcherHost* GetGinNativeBridgeDispatcherHost()
601 return gin_native_bridge_dispatcher_host_.get();
603 bool SetPageVisibility(Ewk_Page_Visibility_State page_visibility_state);
605 void SetExceededIndexedDatabaseQuotaCallback(
606 Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback,
608 void InvokeExceededIndexedDatabaseQuotaCallback(const GURL& origin,
609 int64_t current_quota);
610 void ExceededIndexedDatabaseQuotaReply(bool allow);
612 /// ---- Event handling
615 bool HandleMove(int x, int y);
616 bool HandleResize(int width, int height);
617 bool HandleTextSelectionDown(int x, int y);
618 bool HandleTextSelectionUp(int x, int y);
620 void HandleRendererProcessCrash();
621 void InvokeWebProcessCrashedCallback();
623 void HandleTapGestureForSelection(bool is_content_editable);
624 void HandleZoomGesture(blink::WebGestureEvent& event);
627 void RequestManifest(Ewk_View_Request_Manifest_Callback callback,
629 void DidRespondRequestManifest(_Ewk_View_Request_Manifest* manifest,
630 Ewk_View_Request_Manifest_Callback callback,
633 void SyncAcceptLanguages(const std::string& accept_languages);
635 void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
636 const gfx::Vector2dF& latest_overscroll_delta);
638 bool SetVisibility(bool enable);
640 content::DateTimeChooserEfl* GetDateTimeChooser() {
641 return date_time_chooser_;
644 bool ShouldIgnoreNavigation(content::NavigationHandle* navigation_handle);
646 #if BUILDFLAG(IS_TIZEN_TV)
647 void DrawLabel(Evas_Object* image, Eina_Rectangle rect);
649 #endif // IS_TIZEN_TV
651 void SetDidChangeThemeColorCallback(
652 Ewk_View_Did_Change_Theme_Color_Callback callback,
654 void DidChangeThemeColor(const SkColor& color);
657 void InitializeContent();
658 void InitializeWindowTreeHost();
659 void SendDelayedMessages(content::RenderViewHost* render_view_host);
661 void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
662 Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
665 Ewk_Hit_Test_Mode mode,
666 WebViewAsyncRequestHitTestDataCallback* cb);
667 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
668 static void cameraResultCb(service_h request,
670 service_result_e result,
674 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
675 bool LaunchCamera(std::u16string mimetype);
677 #if !defined(USE_AURA)
678 content::RenderWidgetHostViewEfl* rwhv() const;
680 JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
682 void ReleasePopupMenuList();
683 // Changes viewport without resizing Evas_Object representing webview
684 // and its corresponding RWHV to let Blink renders custom viewport
685 // while showing picker.
686 void AdjustViewPortHeightToPopupMenu(bool is_popup_menu_visible);
688 void ShowContextMenuInternal(const content::ContextMenuParams&);
690 void UpdateWebkitPreferencesEfl(content::RenderViewHost*);
692 void ChangeScroll(int& x, int& y);
693 void ScrollFocusedNodeIntoView();
695 void GenerateMHTML(Ewk_View_Save_Page_Callback callback,
697 const base::FilePath& file_path);
698 void MHTMLGenerated(Ewk_View_Save_Page_Callback callback,
700 const base::FilePath& file_path,
703 static void OnViewFocusIn(void* data, Evas*, Evas_Object*, void*);
704 static void OnViewFocusOut(void* data, Evas*, Evas_Object*, void*);
706 scoped_refptr<WebViewEvasEventHandler> evas_event_handler_;
707 scoped_refptr<Ewk_Context> context_;
708 std::unique_ptr<content::WebContents> web_contents_;
709 std::unique_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
710 std::string pending_url_request_;
711 std::unique_ptr<Ewk_Settings> settings_;
712 std::unique_ptr<_Ewk_Frame> frame_;
713 std::unique_ptr<_Ewk_Policy_Decision> window_policy_;
714 Evas_Object* evas_object_;
715 Evas_Object* native_view_;
716 bool touch_events_enabled_;
717 bool mouse_events_enabled_;
718 double text_zoom_factor_;
719 mutable std::string user_agent_;
720 mutable std::string user_agent_app_name_;
721 std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_;
722 std::string selected_text_cached_;
724 Eina_List* popupMenuItems_;
725 Popup_Picker* popupPicker_;
726 bool formIsNavigating_;
733 formNavigation formNavigation_;
734 std::unique_ptr<content::ContextMenuControllerEfl> context_menu_;
735 #if !defined(EWK_BRINGUP) // FIXME: m71 bringup
736 std::unique_ptr<content::FileChooserControllerEfl> file_chooser_;
738 std::unique_ptr<content::PopupControllerEfl> popup_controller_;
739 std::u16string previous_text_;
740 int current_find_request_id_;
741 static int find_request_id_counter_;
743 typedef WebViewCallback<Ewk_View_Plain_Text_Get_Callback, const char*>
744 EwkViewPlainTextGetCallback;
745 base::IDMap<EwkViewPlainTextGetCallback*> plain_text_get_callback_map_;
747 typedef WebViewCallback<Ewk_View_MHTML_Data_Get_Callback, const char*>
748 MHTMLCallbackDetails;
749 base::IDMap<MHTMLCallbackDetails*> mhtml_callback_map_;
751 typedef WebViewCallback<Ewk_View_Main_Frame_Scrollbar_Visible_Get_Callback,
753 MainFrameScrollbarVisibleGetCallback;
754 base::IDMap<MainFrameScrollbarVisibleGetCallback*>
755 main_frame_scrollbar_visible_callback_map_;
757 base::IDMap<BackgroundColorGetCallback*> background_color_get_callback_map_;
759 gfx::Size contents_size_;
761 mutable std::string title_;
762 Hit_Test_Params hit_test_params_;
763 base::WaitableEvent hit_test_completion_;
764 double page_scale_factor_;
768 WebViewCallback<Ewk_View_Geolocation_Permission_Callback,
769 _Ewk_Geolocation_Permission_Request*>
770 geolocation_permission_cb_;
771 WebViewCallback<Ewk_View_User_Media_Permission_Callback,
772 _Ewk_User_Media_Permission_Request*>
773 user_media_permission_cb_;
774 WebViewCallbackWithReturnValue<Ewk_User_Media_Permission_Query_Result,
775 Ewk_View_User_Media_Permission_Query_Callback,
776 _Ewk_User_Media_Permission_Query*>
777 user_media_permission_query_cb_;
778 WebViewCallback<Ewk_View_Unfocus_Allow_Callback, Ewk_Unfocus_Direction>
780 WebViewCallback<Ewk_View_Notification_Permission_Callback,
781 Ewk_Notification_Permission_Request*>
782 notification_permission_callback_;
783 WebViewCallback<Ewk_Quota_Permission_Request_Callback,
784 const _Ewk_Quota_Permission_Request*>
785 quota_request_callback_;
786 WebViewCallback<Ewk_View_Authentication_Callback, _Ewk_Auth_Challenge*>
788 WebViewCallback<Ewk_View_Scale_Changed_Callback, double> scale_changed_cb_;
790 std::unique_ptr<content::InputPicker> input_picker_;
792 DidChangeThemeColorCallback did_change_theme_color_callback_;
794 base::IDMap<WebApplicationIconUrlGetCallback*>
795 web_app_icon_url_get_callback_map_;
796 base::IDMap<WebApplicationIconUrlsGetCallback*>
797 web_app_icon_urls_get_callback_map_;
798 base::IDMap<WebApplicationCapableGetCallback*>
799 web_app_capable_get_callback_map_;
800 std::unique_ptr<PermissionPopupManager> permission_popup_manager_;
801 std::unique_ptr<ScrollDetector> scroll_detector_;
803 // Manages injecting native objects.
804 std::unique_ptr<content::GinNativeBridgeDispatcherHost>
805 gin_native_bridge_dispatcher_host_;
807 WebViewExceededQuotaCallback<
808 Ewk_View_Exceeded_Indexed_Database_Quota_Callback,
809 Ewk_Security_Origin*,
811 exceeded_indexed_db_quota_callback_;
812 std::unique_ptr<Ewk_Security_Origin> exceeded_indexed_db_quota_origin_;
814 #if BUILDFLAG(IS_TIZEN)
815 blink::mojom::FileChooserParams::Mode filechooser_mode_;
817 std::map<const _Ewk_Quota_Permission_Request*,
818 content::QuotaPermissionContext::PermissionCallback>
819 quota_permission_request_map_;
821 bool is_initialized_;
823 std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;
825 static content::WebContentsEflDelegate::WebContentsCreateCallback
826 create_new_window_web_contents_cb_;
829 gfx::Vector2d previous_scroll_position_;
831 gfx::Point context_menu_position_;
833 std::vector<IPC::Message*> delayed_messages_;
835 std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
837 content::AcceptLanguagesHelper::AcceptLangsChangedCallback
838 accept_langs_changed_callback_;
840 std::unique_ptr<aura::WindowTreeHost> host_;
841 std::unique_ptr<aura::client::FocusClient> focus_client_;
842 std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
843 content::DateTimeChooserEfl* date_time_chooser_ = nullptr;
846 const unsigned int g_default_tilt_motion_sensitivity = 3;