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;
85 class _Ewk_Policy_Decision;
88 class WebViewEvasEventHandler;
89 class _Ewk_Quota_Permission_Request;
91 template <typename CallbackPtr, typename CallbackParameter>
92 class WebViewCallback {
94 WebViewCallback() { Set(nullptr, nullptr); }
96 void Set(CallbackPtr cb, void* data) {
101 bool IsCallbackSet() const { return callback_; }
103 Eina_Bool Run(Evas_Object* webview,
104 CallbackParameter param,
105 Eina_Bool* callback_result) {
106 CHECK(callback_result);
107 if (IsCallbackSet()) {
108 *callback_result = callback_(webview, param, user_data_);
114 void Run(Evas_Object* webview, CallbackParameter param) {
116 callback_(webview, param, user_data_);
120 CallbackPtr callback_;
124 template <typename CallbackReturnValue,
125 typename CallbackPtr,
126 typename CallbackParameter>
127 class WebViewCallbackWithReturnValue {
129 WebViewCallbackWithReturnValue() { Set(nullptr, nullptr); }
131 void Set(CallbackPtr cb, void* data) {
136 /* LCOV_EXCL_START */
137 bool IsCallbackSet() const { return callback_; }
139 CallbackReturnValue Run(Evas_Object* webview, CallbackParameter param) {
141 return callback_(webview, param, user_data_);
148 CallbackPtr callback_;
152 template <typename CallbackPtr, typename... CallbackParameter>
153 class WebViewExceededQuotaCallback {
155 WebViewExceededQuotaCallback() { Set(nullptr, nullptr); }
157 void Set(CallbackPtr cb, void* data) {
162 bool IsCallbackSet() const { return callback_; }
164 /* LCOV_EXCL_START */
165 void Run(Evas_Object* webview, CallbackParameter... param) {
167 callback_(webview, param..., user_data_);
172 CallbackPtr callback_;
176 class WebApplicationIconUrlGetCallback {
178 WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func,
180 : func_(func), user_data_(user_data) {}
181 void Run(const std::string& url) {
183 (func_)(url.c_str(), user_data_);
188 Ewk_Web_App_Icon_URL_Get_Callback func_;
192 class WebApplicationIconUrlsGetCallback {
194 WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func,
196 : func_(func), user_data_(user_data) {}
197 void Run(const std::map<std::string, std::string>& urls) {
199 Eina_List* list = NULL;
200 for (std::map<std::string, std::string>::const_iterator it = urls.begin();
201 it != urls.end(); ++it) {
202 _Ewk_Web_App_Icon_Data* data =
203 ewkWebAppIconDataCreate(it->first, it->second);
204 list = eina_list_append(list, data);
206 (func_)(list, user_data_);
211 Ewk_Web_App_Icon_URLs_Get_Callback func_;
215 class WebApplicationCapableGetCallback {
217 WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func,
219 : func_(func), user_data_(user_data) {}
220 void Run(bool capable) {
222 (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
227 Ewk_Web_App_Capable_Get_Callback func_;
231 class WebViewAsyncRequestHitTestDataCallback;
232 class JavaScriptDialogManagerEfl;
233 class PermissionPopupManager;
237 static EWebView* FromEvasObject(Evas_Object* eo);
239 EWebView(Ewk_Context*, Evas_Object* smart_object);
242 // initialize data members and activate event handlers.
243 // call this once after created and before use
246 bool CreateNewWindow(
247 content::WebContentsEflDelegate::WebContentsCreateCallback);
248 static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
250 content::WebContentsViewAura* wcva() const;
251 content::RenderWidgetHostViewAura* rwhva() const;
252 Ewk_Context* context() const { return context_.get(); }
253 Evas_Object* evas_object() const { return evas_object_; }
254 Evas_Object* native_view() const { return native_view_; }
255 Evas_Object* GetElmWindow() const;
256 Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
257 PermissionPopupManager* GetPermissionPopupManager() const {
258 return permission_popup_manager_.get();
261 content::WebContents& web_contents() const { return *web_contents_.get(); }
263 template <EWebViewCallbacks::CallbackType callbackType>
264 EWebViewCallbacks::CallBack<callbackType> SmartCallback() const {
265 return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
268 void set_magnifier(bool status);
271 void SetURL(const GURL& url, bool from_api = false);
272 const GURL& GetURL() const;
273 const GURL& GetOriginalURL() const;
275 void ReloadBypassingCache();
276 Eina_Bool CanGoBack();
277 Eina_Bool CanGoForward();
278 Eina_Bool HasFocus() const;
279 void SetFocus(Eina_Bool focus);
281 Eina_Bool GoForward();
285 void SetSessionTimeout(uint64_t timeout);
286 double GetTextZoomFactor() const;
287 void SetTextZoomFactor(double text_zoom_factor);
288 double GetPageZoomFactor() const;
289 void SetPageZoomFactor(double page_zoom_factor);
290 void ExecuteEditCommand(const char* command, const char* value);
291 void SetOrientation(int orientation);
292 int GetOrientation();
293 bool TouchEventsEnabled() const;
294 void SetTouchEventsEnabled(bool enabled);
295 bool MouseEventsEnabled() const;
296 void SetMouseEventsEnabled(bool enabled);
297 void HandleTouchEvents(Ewk_Touch_Event_Type type,
298 const Eina_List* points,
299 const Evas_Modifier* modifiers);
302 bool ExecuteJavaScript(const char* script,
303 Ewk_View_Script_Execute_Callback callback,
305 bool SetUserAgent(const char* userAgent);
306 bool SetUserAgentAppName(const char* application_name);
307 bool SetPrivateBrowsing(bool incognito);
308 bool GetPrivateBrowsing() const;
309 const char* GetUserAgent() const;
310 const char* GetUserAgentAppName() const;
311 const char* CacheSelectedText();
312 Ewk_Settings* GetSettings() { return settings_.get(); }
313 _Ewk_Frame* GetMainFrame();
314 void UpdateWebKitPreferences();
315 void LoadHTMLString(const char* html,
316 const char* base_uri,
317 const char* unreachable_uri);
318 void LoadPlainTextString(const char* plain_text);
319 void LoadData(const char* data,
321 const char* mime_type,
322 const char* encoding,
323 const char* base_uri,
324 const char* unreachable_uri = NULL);
326 void InvokeLoadError(const GURL& url, int error_code, bool is_cancellation);
328 void SetViewAuthCallback(Ewk_View_Authentication_Callback callback,
330 void InvokeAuthCallback(LoginDelegateEfl* login_delegate,
332 const std::string& realm);
333 void Find(const char* text, Ewk_Find_Options);
334 void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
335 void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
336 void HandlePopupMenu(std::vector<blink::mojom::MenuItemPtr> items,
339 void HidePopupMenu();
340 void UpdateFormNavigation(int formElementCount,
341 int currentNodeIndex,
344 void FormNavigate(bool direction);
345 bool FormIsNavigating() const { return formIsNavigating_; }
346 void SetFormIsNavigating(bool formIsNavigating);
347 Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex);
348 Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
349 Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
350 void PopupMenuClose();
351 void HandleLongPressGesture(const content::ContextMenuParams&);
352 void ShowContextMenu(const content::ContextMenuParams&);
353 void CancelContextMenu(int request_id);
354 void SetScale(double scale_factor);
355 bool GetScrollPosition(int* x, int* y) const;
356 void SetScroll(int x, int y);
357 void UrlRequestSet(const char* url,
358 content::NavigationController::LoadURLType loadtype,
362 content::SelectionControllerEfl* GetSelectionController() const;
363 content::PopupControllerEfl* GetPopupController() const {
364 return popup_controller_.get();
366 ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
367 void MoveCaret(const gfx::Point& point);
368 void QuerySelectionStyle();
369 void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
370 void SelectLinkText(const gfx::Point& touch_point);
371 bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
372 Eina_Bool ClearSelection();
374 // Callback OnCopyFromBackingStore will be called once we get the snapshot
376 void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
381 void RenderViewReady();
384 * Creates a snapshot of given rectangle from EWebView
386 * @param rect rectangle of EWebView which will be taken into snapshot
387 * @param scale_factor scale factor
388 * @return created snapshot or NULL if error occured.
389 * @note ownership of snapshot is passed to caller
391 Evas_Object* GetSnapshot(Eina_Rectangle rect, float scale_factor);
393 bool GetSnapshotAsync(Eina_Rectangle rect,
394 Ewk_Web_App_Screenshot_Captured_Callback callback,
397 void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision,
399 void InvokePolicyNavigationCallback(const NavigationPolicyParams& params,
401 void UseSettingsFont();
403 _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
404 Eina_Bool AsyncRequestHitTestDataAt(int x,
406 Ewk_Hit_Test_Mode mode,
407 Ewk_View_Hit_Test_Request_Callback,
409 _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x,
411 Ewk_Hit_Test_Mode mode);
412 Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
415 Ewk_Hit_Test_Mode mode,
416 Ewk_View_Hit_Test_Request_Callback,
418 void DispatchAsyncHitTestData(const Hit_Test_Params& params,
420 void UpdateHitTestData(const Hit_Test_Params& params);
422 int current_find_request_id() const { return current_find_request_id_; }
423 bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
424 void InvokePlainTextGetCallback(const std::string& content_text,
425 int plain_text_get_callback_id);
426 int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback,
428 void SetViewGeolocationPermissionCallback(
429 Ewk_View_Geolocation_Permission_Callback callback,
431 bool InvokeViewGeolocationPermissionCallback(
432 _Ewk_Geolocation_Permission_Request*
433 geolocation_permission_request_context,
435 void SetViewUserMediaPermissionCallback(
436 Ewk_View_User_Media_Permission_Callback callback,
438 bool InvokeViewUserMediaPermissionCallback(
439 _Ewk_User_Media_Permission_Request* user_media_permission_request_context,
441 void SetViewUserMediaPermissionQueryCallback(
442 Ewk_View_User_Media_Permission_Query_Callback callback,
444 Ewk_User_Media_Permission_Query_Result
445 InvokeViewUserMediaPermissionQueryCallback(
446 _Ewk_User_Media_Permission_Query* user_media_permission_query_context);
447 void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
449 bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction,
451 void DidChangeContentsSize(int width, int height);
452 const Eina_Rectangle GetContentsSize() const;
453 void GetScrollSize(int* w, int* h);
455 void SetProgressValue(double progress);
456 double GetProgressValue();
457 const char* GetTitle();
458 bool SaveAsPdf(int width, int height, const std::string& file_name);
459 void BackForwardListClear();
460 _Ewk_Back_Forward_List* GetBackForwardList() const;
461 void InvokeBackForwardListChangedCallback();
462 _Ewk_History* GetBackForwardHistory() const;
463 bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback,
465 bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback,
467 bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback,
469 void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
470 void InvokeWebAppIconUrlGetCallback(const std::string& iconUrl,
472 void InvokeWebAppIconUrlsGetCallback(
473 const std::map<std::string, std::string>& iconUrls,
475 void SetNotificationPermissionCallback(
476 Ewk_View_Notification_Permission_Callback callback,
478 bool IsNotificationPermissionCallbackSet() const;
479 bool InvokeNotificationPermissionCallback(
480 Ewk_Notification_Permission_Request* request);
482 bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
483 void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
484 bool SavePageAsMHTML(const std::string& path,
485 Ewk_View_Save_Page_Callback callback,
488 void ExitFullscreen();
490 void DidChangePageScaleFactor(double scale_factor);
491 void SetScaledContentsSize();
492 void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
494 void JavaScriptAlertReply();
495 void SetJavaScriptConfirmCallback(
496 Ewk_View_JavaScript_Confirm_Callback callback,
498 void JavaScriptConfirmReply(bool result);
499 void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback,
501 void JavaScriptPromptReply(const char* result);
502 void set_renderer_crashed();
503 void GetPageScaleRange(double* min_scale, double* max_scale);
504 void SetDrawsTransparentBackground(bool enabled);
505 void GetSessionData(const char** data, unsigned* length) const;
506 bool RestoreFromSessionData(const char* data, unsigned length);
507 void ShowFileChooser(content::RenderFrameHost* render_frame_host,
508 const blink::mojom::FileChooserParams&);
509 void SetBrowserFont();
510 bool IsDragging() const;
512 void RequestColorPicker(int r, int g, int b, int a);
513 bool SetColorPickerColor(int r, int g, int b, int a);
514 void InputPickerShow(ui::TextInputType input_type,
516 content::DateTimeChooserEfl* date_time_chooser);
518 void ShowContentsDetectedPopup(const char*);
520 // Returns TCP port number with Inspector, or 0 if error.
521 int StartInspectorServer(int port = 0);
522 bool StopInspectorServer();
524 void LoadNotFoundErrorPage(const std::string& invalidUrl);
525 static std::string GetPlatformLocale();
526 bool GetLinkMagnifierEnabled() const;
527 void SetLinkMagnifierEnabled(bool enabled);
529 void SetQuotaPermissionRequestCallback(
530 Ewk_Quota_Permission_Request_Callback callback,
532 void InvokeQuotaPermissionRequest(
533 _Ewk_Quota_Permission_Request* request,
534 content::QuotaPermissionContext::PermissionCallback cb);
535 void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
537 void QuotaRequestCancel(const _Ewk_Quota_Permission_Request* request);
538 #if !defined(EWK_BRINGUP) // FIXME: m67 bringup
539 void SetViewMode(blink::WebViewMode view_mode);
541 gfx::Point GetContextMenuPosition() const;
543 content::ContextMenuControllerEfl* GetContextMenuController() {
544 return context_menu_.get();
546 void ResetContextMenuController();
547 Eina_Bool AddJavaScriptMessageHandler(Evas_Object* view,
548 Ewk_View_Script_Message_Cb callback,
551 content::GinNativeBridgeDispatcherHost* GetGinNativeBridgeDispatcherHost()
553 return gin_native_bridge_dispatcher_host_.get();
555 bool SetPageVisibility(Ewk_Page_Visibility_State page_visibility_state);
557 void SetExceededIndexedDatabaseQuotaCallback(
558 Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback,
560 void InvokeExceededIndexedDatabaseQuotaCallback(const GURL& origin,
561 int64_t current_quota);
562 void ExceededIndexedDatabaseQuotaReply(bool allow);
564 /// ---- Event handling
567 bool HandleMove(int x, int y);
568 bool HandleResize(int width, int height);
569 bool HandleTextSelectionDown(int x, int y);
570 bool HandleTextSelectionUp(int x, int y);
572 void HandleRendererProcessCrash();
573 void InvokeWebProcessCrashedCallback();
575 void HandleTapGestureForSelection(bool is_content_editable);
576 void HandleZoomGesture(blink::WebGestureEvent& event);
579 void RequestManifest(Ewk_View_Request_Manifest_Callback callback,
581 void DidRespondRequestManifest(_Ewk_View_Request_Manifest* manifest,
582 Ewk_View_Request_Manifest_Callback callback,
585 void SyncAcceptLanguages(const std::string& accept_languages);
587 void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
588 const gfx::Vector2dF& latest_overscroll_delta);
590 bool SetVisibility(bool enable);
592 content::DateTimeChooserEfl* GetDateTimeChooser() {
593 return date_time_chooser_;
597 void InitializeContent();
598 void InitializeWindowTreeHost();
599 void SendDelayedMessages(content::RenderViewHost* render_view_host);
601 void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
602 Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
605 Ewk_Hit_Test_Mode mode,
606 WebViewAsyncRequestHitTestDataCallback* cb);
607 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
608 static void cameraResultCb(service_h request,
610 service_result_e result,
614 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
615 bool LaunchCamera(std::u16string mimetype);
617 #if !defined(USE_AURA)
618 content::RenderWidgetHostViewEfl* rwhv() const;
620 JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
622 void ReleasePopupMenuList();
623 // Changes viewport without resizing Evas_Object representing webview
624 // and its corresponding RWHV to let Blink renders custom viewport
625 // while showing picker.
626 void AdjustViewPortHeightToPopupMenu(bool is_popup_menu_visible);
628 void ShowContextMenuInternal(const content::ContextMenuParams&);
630 void UpdateWebkitPreferencesEfl(content::RenderViewHost*);
632 void ChangeScroll(int& x, int& y);
633 void ScrollFocusedNodeIntoView();
635 void GenerateMHTML(Ewk_View_Save_Page_Callback callback,
637 const base::FilePath& file_path);
638 void MHTMLGenerated(Ewk_View_Save_Page_Callback callback,
640 const base::FilePath& file_path,
643 static void OnViewFocusIn(void* data, Evas*, Evas_Object*, void*);
644 static void OnViewFocusOut(void* data, Evas*, Evas_Object*, void*);
646 scoped_refptr<WebViewEvasEventHandler> evas_event_handler_;
647 scoped_refptr<Ewk_Context> context_;
648 scoped_refptr<Ewk_Context> old_context_;
649 std::unique_ptr<content::WebContents> web_contents_;
650 std::unique_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
651 std::string pending_url_request_;
652 std::unique_ptr<Ewk_Settings> settings_;
653 std::unique_ptr<_Ewk_Frame> frame_;
654 std::unique_ptr<_Ewk_Policy_Decision> window_policy_;
655 Evas_Object* evas_object_;
656 Evas_Object* native_view_;
657 bool touch_events_enabled_;
658 bool mouse_events_enabled_;
659 double text_zoom_factor_;
660 mutable std::string user_agent_;
661 mutable std::string user_agent_app_name_;
662 std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_;
663 std::string selected_text_cached_;
665 Eina_List* popupMenuItems_;
666 Popup_Picker* popupPicker_;
667 bool formIsNavigating_;
674 formNavigation formNavigation_;
675 std::unique_ptr<content::ContextMenuControllerEfl> context_menu_;
676 #if !defined(EWK_BRINGUP) // FIXME: m71 bringup
677 std::unique_ptr<content::FileChooserControllerEfl> file_chooser_;
679 std::unique_ptr<content::PopupControllerEfl> popup_controller_;
680 std::u16string previous_text_;
681 int current_find_request_id_;
682 static int find_request_id_counter_;
684 typedef WebViewCallback<Ewk_View_Plain_Text_Get_Callback, const char*>
685 EwkViewPlainTextGetCallback;
686 base::IDMap<EwkViewPlainTextGetCallback*> plain_text_get_callback_map_;
688 typedef WebViewCallback<Ewk_View_MHTML_Data_Get_Callback, const char*>
689 MHTMLCallbackDetails;
690 base::IDMap<MHTMLCallbackDetails*> mhtml_callback_map_;
692 gfx::Size contents_size_;
694 mutable std::string title_;
695 Hit_Test_Params hit_test_params_;
696 base::WaitableEvent hit_test_completion_;
697 double page_scale_factor_;
701 WebViewCallback<Ewk_View_Geolocation_Permission_Callback,
702 _Ewk_Geolocation_Permission_Request*>
703 geolocation_permission_cb_;
704 WebViewCallback<Ewk_View_User_Media_Permission_Callback,
705 _Ewk_User_Media_Permission_Request*>
706 user_media_permission_cb_;
707 WebViewCallbackWithReturnValue<Ewk_User_Media_Permission_Query_Result,
708 Ewk_View_User_Media_Permission_Query_Callback,
709 _Ewk_User_Media_Permission_Query*>
710 user_media_permission_query_cb_;
711 WebViewCallback<Ewk_View_Unfocus_Allow_Callback, Ewk_Unfocus_Direction>
713 WebViewCallback<Ewk_View_Notification_Permission_Callback,
714 Ewk_Notification_Permission_Request*>
715 notification_permission_callback_;
716 WebViewCallback<Ewk_Quota_Permission_Request_Callback,
717 const _Ewk_Quota_Permission_Request*>
718 quota_request_callback_;
719 WebViewCallback<Ewk_View_Authentication_Callback, _Ewk_Auth_Challenge*>
722 std::unique_ptr<content::InputPicker> input_picker_;
723 base::IDMap<WebApplicationIconUrlGetCallback*>
724 web_app_icon_url_get_callback_map_;
725 base::IDMap<WebApplicationIconUrlsGetCallback*>
726 web_app_icon_urls_get_callback_map_;
727 base::IDMap<WebApplicationCapableGetCallback*>
728 web_app_capable_get_callback_map_;
729 std::unique_ptr<PermissionPopupManager> permission_popup_manager_;
730 std::unique_ptr<ScrollDetector> scroll_detector_;
732 // Manages injecting native objects.
733 std::unique_ptr<content::GinNativeBridgeDispatcherHost>
734 gin_native_bridge_dispatcher_host_;
736 WebViewExceededQuotaCallback<
737 Ewk_View_Exceeded_Indexed_Database_Quota_Callback,
738 Ewk_Security_Origin*,
740 exceeded_indexed_db_quota_callback_;
741 std::unique_ptr<Ewk_Security_Origin> exceeded_indexed_db_quota_origin_;
743 #if BUILDFLAG(IS_TIZEN)
744 blink::mojom::FileChooserParams::Mode filechooser_mode_;
746 std::map<const _Ewk_Quota_Permission_Request*,
747 content::QuotaPermissionContext::PermissionCallback>
748 quota_permission_request_map_;
750 bool is_initialized_;
752 std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;
754 static content::WebContentsEflDelegate::WebContentsCreateCallback
755 create_new_window_web_contents_cb_;
758 gfx::Vector2d previous_scroll_position_;
760 gfx::Point context_menu_position_;
762 std::vector<IPC::Message*> delayed_messages_;
764 std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
766 content::AcceptLanguagesHelper::AcceptLangsChangedCallback
767 accept_langs_changed_callback_;
769 std::unique_ptr<aura::WindowTreeHost> host_;
770 std::unique_ptr<aura::client::FocusClient> focus_client_;
771 std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
772 content::DateTimeChooserEfl* date_time_chooser_ = nullptr;
775 const unsigned int g_default_tilt_motion_sensitivity = 3;