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/public/browser/context_menu_params.h"
29 #include "content/public/browser/navigation_controller.h"
30 #include "content/public/browser/quota_permission_context.h"
31 #include "content/public/browser/web_contents_delegate.h"
32 #include "content/public/browser/web_contents_efl_delegate.h"
33 #include "content/public/common/input_event_ack_state.h"
34 #include "content_browser_client_efl.h"
35 #include "context_menu_controller_efl.h"
36 #include "eweb_context.h"
37 #include "eweb_view_callbacks.h"
38 #include "file_chooser_controller_efl.h"
39 #include "permission_popup_manager.h"
40 #include "popup_controller_efl.h"
41 #include "private/ewk_auth_challenge_private.h"
42 #include "private/ewk_back_forward_list_private.h"
43 #include "private/ewk_history_private.h"
44 #include "private/ewk_hit_test_private.h"
45 #include "private/ewk_settings_private.h"
46 #include "private/ewk_web_application_icon_data_private.h"
47 #include "public/ewk_hit_test_internal.h"
48 #include "public/ewk_touch_internal.h"
49 #include "public/ewk_view_product.h"
50 #include "scroll_detector.h"
51 #include "third_party/blink/public/common/context_menu_data/menu_item_info.h"
52 #include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h"
53 #include "ui/aura/window_tree_host.h"
54 #include "ui/gfx/geometry/point.h"
55 #include "ui/gfx/geometry/size.h"
56 #include "web_contents_delegate_efl.h"
61 class WindowParentingClient;
70 class RenderFrameHost;
72 class RenderWidgetHostViewAura;
73 class WebContentsDelegateEfl;
74 class WebContentsViewAura;
75 class ContextMenuControllerEfl;
76 class PopupControllerEfl;
78 class GinNativeBridgeDispatcherHost;
82 class _Ewk_Policy_Decision;
85 class WebViewEvasEventHandler;
86 class _Ewk_Quota_Permission_Request;
88 template <typename CallbackPtr, typename CallbackParameter>
89 class WebViewCallback {
91 WebViewCallback() { Set(nullptr, nullptr); }
93 void Set(CallbackPtr cb, void* data) {
98 bool IsCallbackSet() const { return callback_; }
100 Eina_Bool Run(Evas_Object* webview,
101 CallbackParameter param,
102 Eina_Bool* callback_result) {
103 CHECK(callback_result);
104 if (IsCallbackSet()) {
105 *callback_result = callback_(webview, param, user_data_);
111 void Run(Evas_Object* webview, CallbackParameter param) {
113 callback_(webview, param, user_data_);
117 CallbackPtr callback_;
121 template <typename CallbackReturnValue,
122 typename CallbackPtr,
123 typename CallbackParameter>
124 class WebViewCallbackWithReturnValue {
126 WebViewCallbackWithReturnValue() { Set(nullptr, nullptr); }
128 void Set(CallbackPtr cb, void* data) {
133 /* LCOV_EXCL_START */
134 bool IsCallbackSet() const { return callback_; }
136 CallbackReturnValue Run(Evas_Object* webview, CallbackParameter param) {
138 return callback_(webview, param, user_data_);
145 CallbackPtr callback_;
149 template <typename CallbackPtr, typename... CallbackParameter>
150 class WebViewExceededQuotaCallback {
152 WebViewExceededQuotaCallback() { Set(nullptr, nullptr); }
154 void Set(CallbackPtr cb, void* data) {
159 bool IsCallbackSet() const { return callback_; }
161 /* LCOV_EXCL_START */
162 void Run(Evas_Object* webview, CallbackParameter... param) {
164 callback_(webview, param..., user_data_);
169 CallbackPtr callback_;
173 class WebApplicationIconUrlGetCallback {
175 WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func,
177 : func_(func), user_data_(user_data) {}
178 void Run(const std::string& url) {
180 (func_)(url.c_str(), user_data_);
185 Ewk_Web_App_Icon_URL_Get_Callback func_;
189 class WebApplicationIconUrlsGetCallback {
191 WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func,
193 : func_(func), user_data_(user_data) {}
194 void Run(const std::map<std::string, std::string>& urls) {
196 Eina_List* list = NULL;
197 for (std::map<std::string, std::string>::const_iterator it = urls.begin();
198 it != urls.end(); ++it) {
199 _Ewk_Web_App_Icon_Data* data =
200 ewkWebAppIconDataCreate(it->first, it->second);
201 list = eina_list_append(list, data);
203 (func_)(list, user_data_);
208 Ewk_Web_App_Icon_URLs_Get_Callback func_;
212 class WebApplicationCapableGetCallback {
214 WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func,
216 : func_(func), user_data_(user_data) {}
217 void Run(bool capable) {
219 (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
224 Ewk_Web_App_Capable_Get_Callback func_;
228 class WebViewAsyncRequestHitTestDataCallback;
229 class JavaScriptDialogManagerEfl;
230 class PermissionPopupManager;
234 static EWebView* FromEvasObject(Evas_Object* eo);
236 EWebView(Ewk_Context*, Evas_Object* smart_object);
239 // initialize data members and activate event handlers.
240 // call this once after created and before use
243 bool CreateNewWindow(
244 content::WebContentsEflDelegate::WebContentsCreateCallback);
245 static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
247 content::WebContentsViewAura* wcva() const;
248 content::RenderWidgetHostViewAura* rwhva() const;
249 Ewk_Context* context() const { return context_.get(); }
250 Evas_Object* evas_object() const { return evas_object_; }
251 Evas_Object* native_view() const { return native_view_; }
252 Evas_Object* GetElmWindow() const;
253 Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
254 PermissionPopupManager* GetPermissionPopupManager() const {
255 return permission_popup_manager_.get();
258 content::WebContents& web_contents() const { return *web_contents_.get(); }
260 template <EWebViewCallbacks::CallbackType callbackType>
261 EWebViewCallbacks::CallBack<callbackType> SmartCallback() const {
262 return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
265 void set_magnifier(bool status);
268 void SetURL(const GURL& url, bool from_api = false);
269 const GURL& GetURL() const;
270 const GURL& GetOriginalURL() const;
272 void ReloadBypassingCache();
273 Eina_Bool CanGoBack();
274 Eina_Bool CanGoForward();
275 Eina_Bool HasFocus() const;
276 void SetFocus(Eina_Bool focus);
278 Eina_Bool GoForward();
282 void SetSessionTimeout(uint64_t timeout);
283 double GetTextZoomFactor() const;
284 void SetTextZoomFactor(double text_zoom_factor);
285 double GetPageZoomFactor() const;
286 void SetPageZoomFactor(double page_zoom_factor);
287 void ExecuteEditCommand(const char* command, const char* value);
288 void SetOrientation(int orientation);
289 int GetOrientation();
290 bool TouchEventsEnabled() const;
291 void SetTouchEventsEnabled(bool enabled);
292 bool MouseEventsEnabled() const;
293 void SetMouseEventsEnabled(bool enabled);
294 void HandleTouchEvents(Ewk_Touch_Event_Type type,
295 const Eina_List* points,
296 const Evas_Modifier* modifiers);
299 bool ExecuteJavaScript(const char* script,
300 Ewk_View_Script_Execute_Callback callback,
302 bool SetUserAgent(const char* userAgent);
303 bool SetUserAgentAppName(const char* application_name);
304 bool SetPrivateBrowsing(bool incognito);
305 bool GetPrivateBrowsing() const;
306 const char* GetUserAgent() const;
307 const char* GetUserAgentAppName() const;
308 const char* CacheSelectedText();
309 Ewk_Settings* GetSettings() { return settings_.get(); }
310 _Ewk_Frame* GetMainFrame();
311 void UpdateWebKitPreferences();
312 void LoadHTMLString(const char* html,
313 const char* base_uri,
314 const char* unreachable_uri);
315 void LoadPlainTextString(const char* plain_text);
316 void LoadData(const char* data,
318 const char* mime_type,
319 const char* encoding,
320 const char* base_uri,
321 const char* unreachable_uri = NULL);
323 void InvokeLoadError(const GURL& url, int error_code, bool is_cancellation);
325 void SetViewAuthCallback(Ewk_View_Authentication_Callback callback,
327 void InvokeAuthCallback(LoginDelegateEfl* login_delegate,
329 const std::string& realm);
330 void Find(const char* text, Ewk_Find_Options);
331 void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
332 void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
333 void ShowPopupMenu(const std::vector<blink::MenuItemInfo>& items,
336 Eina_Bool HidePopupMenu();
337 void UpdateFormNavigation(int formElementCount,
338 int currentNodeIndex,
341 void FormNavigate(bool direction);
342 bool IsSelectPickerShown() const;
343 void CloseSelectPicker();
344 bool FormIsNavigating() const { return formIsNavigating_; }
345 void SetFormIsNavigating(bool formIsNavigating);
346 Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex);
347 Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
348 Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
349 Eina_Bool PopupMenuClose();
350 void HandleLongPressGesture(const content::ContextMenuParams&);
351 void ShowContextMenu(const content::ContextMenuParams&);
352 void CancelContextMenu(int request_id);
353 void SetScale(double scale_factor);
354 bool GetScrollPosition(int* x, int* y) const;
355 void SetScroll(int x, int y);
356 void UrlRequestSet(const char* url,
357 content::NavigationController::LoadURLType loadtype,
361 content::SelectionControllerEfl* GetSelectionController() const;
362 content::PopupControllerEfl* GetPopupController() const {
363 return popup_controller_.get();
365 ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
366 void MoveCaret(const gfx::Point& point);
367 void QuerySelectionStyle();
368 void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
369 void SelectLinkText(const gfx::Point& touch_point);
370 bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
371 Eina_Bool ClearSelection();
373 // Callback OnCopyFromBackingStore will be called once we get the snapshot
375 void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
380 void RenderViewReady();
383 * Creates a snapshot of given rectangle from EWebView
385 * @param rect rectangle of EWebView which will be taken into snapshot
386 * @param scale_factor scale factor
387 * @return created snapshot or NULL if error occured.
388 * @note ownership of snapshot is passed to caller
390 Evas_Object* GetSnapshot(Eina_Rectangle rect, float scale_factor);
392 bool GetSnapshotAsync(Eina_Rectangle rect,
393 Ewk_Web_App_Screenshot_Captured_Callback callback,
396 void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision,
398 void InvokePolicyNavigationCallback(const NavigationPolicyParams& params,
400 void UseSettingsFont();
402 _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
403 Eina_Bool AsyncRequestHitTestDataAt(int x,
405 Ewk_Hit_Test_Mode mode,
406 Ewk_View_Hit_Test_Request_Callback,
408 _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x,
410 Ewk_Hit_Test_Mode mode);
411 Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
414 Ewk_Hit_Test_Mode mode,
415 Ewk_View_Hit_Test_Request_Callback,
417 void DispatchAsyncHitTestData(const Hit_Test_Params& params,
419 void UpdateHitTestData(const Hit_Test_Params& params);
421 int current_find_request_id() const { return current_find_request_id_; }
422 bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
423 void InvokePlainTextGetCallback(const std::string& content_text,
424 int plain_text_get_callback_id);
425 int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback,
427 void SetViewGeolocationPermissionCallback(
428 Ewk_View_Geolocation_Permission_Callback callback,
430 bool InvokeViewGeolocationPermissionCallback(
431 _Ewk_Geolocation_Permission_Request*
432 geolocation_permission_request_context,
434 void SetViewUserMediaPermissionCallback(
435 Ewk_View_User_Media_Permission_Callback callback,
437 bool InvokeViewUserMediaPermissionCallback(
438 _Ewk_User_Media_Permission_Request* user_media_permission_request_context,
440 void SetViewUserMediaPermissionQueryCallback(
441 Ewk_View_User_Media_Permission_Query_Callback callback,
443 Ewk_User_Media_Permission_Query_Result
444 InvokeViewUserMediaPermissionQueryCallback(
445 _Ewk_User_Media_Permission_Query* user_media_permission_query_context);
446 void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
448 bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction,
450 void DidChangeContentsSize(int width, int height);
451 const Eina_Rectangle GetContentsSize() const;
452 void GetScrollSize(int* w, int* h);
454 void SetProgressValue(double progress);
455 double GetProgressValue();
456 const char* GetTitle();
457 bool SaveAsPdf(int width, int height, const std::string& file_name);
458 void BackForwardListClear();
459 _Ewk_Back_Forward_List* GetBackForwardList() const;
460 void InvokeBackForwardListChangedCallback();
461 _Ewk_History* GetBackForwardHistory() const;
462 bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback,
464 bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback,
466 bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback,
468 void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
469 void InvokeWebAppIconUrlGetCallback(const std::string& iconUrl,
471 void InvokeWebAppIconUrlsGetCallback(
472 const std::map<std::string, std::string>& iconUrls,
474 void SetNotificationPermissionCallback(
475 Ewk_View_Notification_Permission_Callback callback,
477 bool IsNotificationPermissionCallbackSet() const;
478 bool InvokeNotificationPermissionCallback(
479 Ewk_Notification_Permission_Request* request);
481 bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
482 void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
483 bool SavePageAsMHTML(const std::string& path,
484 Ewk_View_Save_Page_Callback callback,
487 void ExitFullscreen();
489 void DidChangePageScaleFactor(double scale_factor);
490 void SetScaledContentsSize();
491 void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
493 void JavaScriptAlertReply();
494 void SetJavaScriptConfirmCallback(
495 Ewk_View_JavaScript_Confirm_Callback callback,
497 void JavaScriptConfirmReply(bool result);
498 void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback,
500 void JavaScriptPromptReply(const char* result);
501 void set_renderer_crashed();
502 void GetPageScaleRange(double* min_scale, double* max_scale);
503 void SetDrawsTransparentBackground(bool enabled);
504 void GetSessionData(const char** data, unsigned* length) const;
505 bool RestoreFromSessionData(const char* data, unsigned length);
506 void ShowFileChooser(content::RenderFrameHost* render_frame_host,
507 const blink::mojom::FileChooserParams&);
508 void SetBrowserFont();
509 bool IsDragging() const;
511 void RequestColorPicker(int r, int g, int b, int a);
512 bool SetColorPickerColor(int r, int g, int b, int a);
513 void InputPickerShow(ui::TextInputType input_type,
515 content::DateTimeChooserEfl* date_time_chooser);
517 void ShowContentsDetectedPopup(const char*);
519 // Returns TCP port number with Inspector, or 0 if error.
520 int StartInspectorServer(int port = 0);
521 bool StopInspectorServer();
523 void LoadNotFoundErrorPage(const std::string& invalidUrl);
524 static std::string GetPlatformLocale();
525 bool GetLinkMagnifierEnabled() const;
526 void SetLinkMagnifierEnabled(bool enabled);
528 void SetQuotaPermissionRequestCallback(
529 Ewk_Quota_Permission_Request_Callback callback,
531 void InvokeQuotaPermissionRequest(
532 _Ewk_Quota_Permission_Request* request,
533 content::QuotaPermissionContext::PermissionCallback cb);
534 void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
536 void QuotaRequestCancel(const _Ewk_Quota_Permission_Request* request);
537 #if !defined(EWK_BRINGUP) // FIXME: m67 bringup
538 void SetViewMode(blink::WebViewMode view_mode);
540 gfx::Point GetContextMenuPosition() const;
542 content::ContextMenuControllerEfl* GetContextMenuController() {
543 return context_menu_.get();
545 void ResetContextMenuController();
546 Eina_Bool AddJavaScriptMessageHandler(Evas_Object* view,
547 Ewk_View_Script_Message_Cb callback,
550 content::GinNativeBridgeDispatcherHost* GetGinNativeBridgeDispatcherHost()
552 return gin_native_bridge_dispatcher_host_.get();
554 bool SetPageVisibility(Ewk_Page_Visibility_State page_visibility_state);
556 void SetExceededIndexedDatabaseQuotaCallback(
557 Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback,
559 void InvokeExceededIndexedDatabaseQuotaCallback(const GURL& origin,
560 int64_t current_quota);
561 void ExceededIndexedDatabaseQuotaReply(bool allow);
563 /// ---- Event handling
566 bool HandleMove(int x, int y);
567 bool HandleResize(int width, int height);
568 bool HandleTextSelectionDown(int x, int y);
569 bool HandleTextSelectionUp(int x, int y);
571 void HandleRendererProcessCrash();
572 void InvokeWebProcessCrashedCallback();
574 void HandleTapGestureForSelection(bool is_content_editable);
575 void HandleZoomGesture(blink::WebGestureEvent& event);
578 void RequestManifest(Ewk_View_Request_Manifest_Callback callback,
580 void DidRespondRequestManifest(_Ewk_View_Request_Manifest* manifest,
581 Ewk_View_Request_Manifest_Callback callback,
584 void SyncAcceptLanguages(const std::string& accept_languages);
586 void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
587 const gfx::Vector2dF& latest_overscroll_delta);
589 bool SetVisibility(bool enable);
591 content::DateTimeChooserEfl* GetDateTimeChooser() {
592 return date_time_chooser_;
596 void InitializeContent();
597 void InitializeWindowTreeHost();
598 void SendDelayedMessages(content::RenderViewHost* render_view_host);
600 void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
601 Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
604 Ewk_Hit_Test_Mode mode,
605 WebViewAsyncRequestHitTestDataCallback* cb);
606 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
607 static void cameraResultCb(service_h request,
609 service_result_e result,
613 #if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
614 bool LaunchCamera(std::u16string mimetype);
616 #if !defined(USE_AURA)
617 content::RenderWidgetHostViewEfl* rwhv() const;
619 JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
621 void ReleasePopupMenuList();
623 void ShowContextMenuInternal(const content::ContextMenuParams&);
625 void UpdateWebkitPreferencesEfl(content::RenderViewHost*);
627 void ChangeScroll(int& x, int& y);
629 void GenerateMHTML(Ewk_View_Save_Page_Callback callback,
631 const base::FilePath& file_path);
632 void MHTMLGenerated(Ewk_View_Save_Page_Callback callback,
634 const base::FilePath& file_path,
637 static void OnViewFocusIn(void* data, Evas*, Evas_Object*, void*);
638 static void OnViewFocusOut(void* data, Evas*, Evas_Object*, void*);
640 scoped_refptr<WebViewEvasEventHandler> evas_event_handler_;
641 scoped_refptr<Ewk_Context> context_;
642 scoped_refptr<Ewk_Context> old_context_;
643 std::unique_ptr<content::WebContents> web_contents_;
644 std::unique_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
645 std::string pending_url_request_;
646 std::unique_ptr<Ewk_Settings> settings_;
647 std::unique_ptr<_Ewk_Frame> frame_;
648 std::unique_ptr<_Ewk_Policy_Decision> window_policy_;
649 Evas_Object* evas_object_;
650 Evas_Object* native_view_;
651 bool touch_events_enabled_;
652 bool mouse_events_enabled_;
653 double text_zoom_factor_;
654 mutable std::string user_agent_;
655 mutable std::string user_agent_app_name_;
656 std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_;
657 std::string selected_text_cached_;
659 Eina_List* popupMenuItems_;
660 Popup_Picker* popupPicker_;
661 bool formIsNavigating_;
668 formNavigation formNavigation_;
669 std::unique_ptr<content::ContextMenuControllerEfl> context_menu_;
670 #if !defined(EWK_BRINGUP) // FIXME: m71 bringup
671 std::unique_ptr<content::FileChooserControllerEfl> file_chooser_;
673 std::unique_ptr<content::PopupControllerEfl> popup_controller_;
674 std::u16string previous_text_;
675 int current_find_request_id_;
676 static int find_request_id_counter_;
678 typedef WebViewCallback<Ewk_View_Plain_Text_Get_Callback, const char*>
679 EwkViewPlainTextGetCallback;
680 base::IDMap<EwkViewPlainTextGetCallback*> plain_text_get_callback_map_;
682 typedef WebViewCallback<Ewk_View_MHTML_Data_Get_Callback, const char*>
683 MHTMLCallbackDetails;
684 base::IDMap<MHTMLCallbackDetails*> mhtml_callback_map_;
686 gfx::Size contents_size_;
688 mutable std::string title_;
689 Hit_Test_Params hit_test_params_;
690 base::WaitableEvent hit_test_completion_;
691 double page_scale_factor_;
695 WebViewCallback<Ewk_View_Geolocation_Permission_Callback,
696 _Ewk_Geolocation_Permission_Request*>
697 geolocation_permission_cb_;
698 WebViewCallback<Ewk_View_User_Media_Permission_Callback,
699 _Ewk_User_Media_Permission_Request*>
700 user_media_permission_cb_;
701 WebViewCallbackWithReturnValue<Ewk_User_Media_Permission_Query_Result,
702 Ewk_View_User_Media_Permission_Query_Callback,
703 _Ewk_User_Media_Permission_Query*>
704 user_media_permission_query_cb_;
705 WebViewCallback<Ewk_View_Unfocus_Allow_Callback, Ewk_Unfocus_Direction>
707 WebViewCallback<Ewk_View_Notification_Permission_Callback,
708 Ewk_Notification_Permission_Request*>
709 notification_permission_callback_;
710 WebViewCallback<Ewk_Quota_Permission_Request_Callback,
711 const _Ewk_Quota_Permission_Request*>
712 quota_request_callback_;
713 WebViewCallback<Ewk_View_Authentication_Callback, _Ewk_Auth_Challenge*>
716 std::unique_ptr<content::InputPicker> input_picker_;
717 base::IDMap<WebApplicationIconUrlGetCallback*>
718 web_app_icon_url_get_callback_map_;
719 base::IDMap<WebApplicationIconUrlsGetCallback*>
720 web_app_icon_urls_get_callback_map_;
721 base::IDMap<WebApplicationCapableGetCallback*>
722 web_app_capable_get_callback_map_;
723 std::unique_ptr<PermissionPopupManager> permission_popup_manager_;
724 std::unique_ptr<ScrollDetector> scroll_detector_;
726 // Manages injecting native objects.
727 std::unique_ptr<content::GinNativeBridgeDispatcherHost>
728 gin_native_bridge_dispatcher_host_;
730 WebViewExceededQuotaCallback<
731 Ewk_View_Exceeded_Indexed_Database_Quota_Callback,
732 Ewk_Security_Origin*,
734 exceeded_indexed_db_quota_callback_;
735 std::unique_ptr<Ewk_Security_Origin> exceeded_indexed_db_quota_origin_;
737 #if BUILDFLAG(IS_TIZEN)
738 blink::mojom::FileChooserParams::Mode filechooser_mode_;
740 std::map<const _Ewk_Quota_Permission_Request*,
741 content::QuotaPermissionContext::PermissionCallback>
742 quota_permission_request_map_;
744 bool is_initialized_;
746 std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;
748 static content::WebContentsEflDelegate::WebContentsCreateCallback
749 create_new_window_web_contents_cb_;
752 gfx::Vector2d previous_scroll_position_;
754 gfx::Point context_menu_position_;
756 std::vector<IPC::Message*> delayed_messages_;
758 std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
760 content::AcceptLanguagesHelper::AcceptLangsChangedCallback
761 accept_langs_changed_callback_;
763 std::unique_ptr<aura::WindowTreeHost> host_;
764 std::unique_ptr<aura::client::FocusClient> focus_client_;
765 std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
766 content::DateTimeChooserEfl* date_time_chooser_ = nullptr;
769 const unsigned int g_default_tilt_motion_sensitivity = 3;