[M85 Migration] Update Accept-Language field on platform language change
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / eweb_view.h
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.
4
5 #ifndef EWEB_VIEW_H
6 #define EWEB_VIEW_H
7
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
10 // include instead.
11 #include <appcore-agent/service_app.h>
12 #endif
13
14 #include <map>
15 #include <string>
16 #include <Evas.h>
17 #include <locale.h>
18 #include <vector>
19
20 #include "base/callback.h"
21 #include "base/containers/id_map.h"
22 #include "base/synchronization/waitable_event.h"
23 #include "browser/inputpicker/InputPicker.h"
24 #include "browser/selectpicker/popup_picker.h"
25 #include "content/browser/renderer_host/event_with_latency_info.h"
26 #include "content/browser/selection/selection_controller_efl.h"
27 #include "content/public/browser/context_menu_params.h"
28 #include "content/public/browser/navigation_controller.h"
29 #include "content/public/browser/quota_permission_context.h"
30 #include "content/public/browser/web_contents_delegate.h"
31 #include "content/public/browser/web_contents_efl_delegate.h"
32 #include "content/public/common/input_event_ack_state.h"
33 #include "content/public/common/menu_item.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/mojom/choosers/file_chooser.mojom.h"
52 #include "ui/gfx/geometry/point.h"
53 #include "ui/gfx/geometry/size.h"
54 #include "web_contents_delegate_efl.h"
55
56 namespace content {
57 class RenderFrameHost;
58 class RenderViewHost;
59 class RenderWidgetHostViewEfl;
60 class WebContentsDelegateEfl;
61 class ContextMenuControllerEfl;
62 class WebContentsViewEfl;
63 class PopupControllerEfl;
64 }
65
66 class ErrorParams;
67 class _Ewk_Policy_Decision;
68 class _Ewk_Hit_Test;
69 class Ewk_Context;
70 class WebViewEvasEventHandler;
71 class _Ewk_Quota_Permission_Request;
72
73 template <typename CallbackPtr, typename CallbackParameter>
74 class WebViewCallback {
75  public:
76   WebViewCallback() { Set(nullptr, nullptr); }
77
78   void Set(CallbackPtr cb, void* data) {
79     callback_ = cb;
80     user_data_ = data;
81   }
82
83   bool IsCallbackSet() const { return callback_; }
84
85   Eina_Bool Run(Evas_Object* webview,
86                 CallbackParameter param,
87                 Eina_Bool* callback_result) {
88     CHECK(callback_result);
89     if (IsCallbackSet()) {
90       *callback_result = callback_(webview, param, user_data_);
91       return true;
92     }
93     return false;
94   }
95
96   void Run(Evas_Object* webview, CallbackParameter param) {
97     if (IsCallbackSet())
98       callback_(webview, param, user_data_);
99   }
100
101  private:
102   CallbackPtr callback_;
103   void* user_data_;
104 };
105
106 class WebApplicationIconUrlGetCallback {
107  public:
108   WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func,
109                                    void* user_data)
110       : func_(func), user_data_(user_data) {}
111   void Run(const std::string& url) {
112     if (func_) {
113       (func_)(url.c_str(), user_data_);
114     }
115   }
116
117  private:
118   Ewk_Web_App_Icon_URL_Get_Callback func_;
119   void* user_data_;
120 };
121
122 class WebApplicationIconUrlsGetCallback {
123  public:
124   WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func,
125                                     void* user_data)
126       : func_(func), user_data_(user_data) {}
127   void Run(const std::map<std::string, std::string>& urls) {
128     if (func_) {
129       Eina_List* list = NULL;
130       for (std::map<std::string, std::string>::const_iterator it = urls.begin();
131            it != urls.end(); ++it) {
132         _Ewk_Web_App_Icon_Data* data =
133             ewkWebAppIconDataCreate(it->first, it->second);
134         list = eina_list_append(list, data);
135       }
136       (func_)(list, user_data_);
137     }
138   }
139
140  private:
141   Ewk_Web_App_Icon_URLs_Get_Callback func_;
142   void* user_data_;
143 };
144
145 class WebApplicationCapableGetCallback {
146  public:
147   WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func,
148                                    void* user_data)
149       : func_(func), user_data_(user_data) {}
150   void Run(bool capable) {
151     if (func_) {
152       (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
153     }
154   }
155
156  private:
157   Ewk_Web_App_Capable_Get_Callback func_;
158   void* user_data_;
159 };
160
161 class WebViewAsyncRequestHitTestDataCallback;
162 class JavaScriptDialogManagerEfl;
163 class PermissionPopupManager;
164
165 class EWebView {
166  public:
167   static EWebView* FromEvasObject(Evas_Object* eo);
168
169   EWebView(Ewk_Context*, Evas_Object* smart_object);
170   ~EWebView();
171
172   // initialize data members and activate event handlers.
173   // call this once after created and before use
174   void Initialize();
175
176   void CreateNewWindow(
177       content::WebContentsEflDelegate::WebContentsCreateCallback);
178   static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
179
180   Ewk_Context* context() const { return context_.get(); }
181   Evas_Object* evas_object() const { return evas_object_; }
182   Evas_Object* native_view() const { return native_view_; }
183   Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
184   PermissionPopupManager* GetPermissionPopupManager() const {
185     return permission_popup_manager_.get();
186   }
187
188   content::WebContents& web_contents() const { return *web_contents_.get(); }
189
190   template <EWebViewCallbacks::CallbackType callbackType>
191   EWebViewCallbacks::CallBack<callbackType> SmartCallback() const {
192     return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
193   }
194
195   void set_magnifier(bool status);
196
197   // ewk_view api
198   void SetURL(const GURL& url);
199   const GURL& GetURL() const;
200   const GURL& GetOriginalURL() const;
201   void Reload();
202   void ReloadBypassingCache();
203   Eina_Bool CanGoBack();
204   Eina_Bool CanGoForward();
205   Eina_Bool HasFocus() const;
206   void SetFocus(Eina_Bool focus);
207   Eina_Bool GoBack();
208   Eina_Bool GoForward();
209   void Suspend();
210   void Resume();
211   void Stop();
212   double GetTextZoomFactor() const;
213   void SetTextZoomFactor(double text_zoom_factor);
214   double GetPageZoomFactor() const;
215   void SetPageZoomFactor(double page_zoom_factor);
216   void ExecuteEditCommand(const char* command, const char* value);
217   void SetOrientation(int orientation);
218   int GetOrientation();
219   bool TouchEventsEnabled() const;
220   void SetTouchEventsEnabled(bool enabled);
221   bool MouseEventsEnabled() const;
222   void SetMouseEventsEnabled(bool enabled);
223   void HandleTouchEvents(Ewk_Touch_Event_Type type,
224                          const Eina_List* points,
225                          const Evas_Modifier* modifiers);
226   void Show();
227   void Hide();
228   bool ExecuteJavaScript(const char* script,
229                          Ewk_View_Script_Execute_Callback callback,
230                          void* userdata);
231   bool SetUserAgent(const char* userAgent);
232   bool SetUserAgentAppName(const char* application_name);
233   bool SetPrivateBrowsing(bool incognito);
234   bool GetPrivateBrowsing() const;
235   const char* GetUserAgent() const;
236   const char* GetUserAgentAppName() const;
237   const char* GetSelectedText() const;
238   Ewk_Settings* GetSettings() { return settings_.get(); }
239   _Ewk_Frame* GetMainFrame();
240   void UpdateWebKitPreferences();
241   void LoadHTMLString(const char* html,
242                       const char* base_uri,
243                       const char* unreachable_uri);
244   void LoadPlainTextString(const char* plain_text);
245   void LoadData(const char* data,
246                 size_t size,
247                 const char* mime_type,
248                 const char* encoding,
249                 const char* base_uri,
250                 const char* unreachable_uri = NULL);
251
252   void InvokeLoadError(const GURL& url,
253                        int error_code,
254                        const std::string& error_description,
255                        bool is_main_frame);
256   void InvokeAuthCallback(LoginDelegateEfl* login_delegate,
257                           const GURL& url,
258                           const std::string& realm);
259   void Find(const char* text, Ewk_Find_Options);
260   void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
261   void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
262   void ShowPopupMenu(const std::vector<content::MenuItem>& items,
263                      int selectedIndex,
264                      bool multiple);
265   Eina_Bool HidePopupMenu();
266   void UpdateFormNavigation(int formElementCount,
267                             int currentNodeIndex,
268                             bool prevState,
269                             bool nextState);
270   void FormNavigate(bool direction);
271   bool IsSelectPickerShown() const;
272   void CloseSelectPicker();
273   bool FormIsNavigating() const { return formIsNavigating_; }
274   void SetFormIsNavigating(bool formIsNavigating);
275   Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex);
276   Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
277   Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
278   Eina_Bool PopupMenuClose();
279   void HandleLongPressGesture(const content::ContextMenuParams&);
280   void ShowContextMenu(const content::ContextMenuParams&);
281   void CancelContextMenu(int request_id);
282   void SetScale(double scale_factor, int x, int y);
283   bool GetScrollPosition(int* x, int* y) const;
284   void SetScroll(int x, int y);
285   void UrlRequestSet(const char* url,
286                      content::NavigationController::LoadURLType loadtype,
287                      Eina_Hash* headers,
288                      const char* body);
289
290   content::SelectionControllerEfl* GetSelectionController() const;
291   content::PopupControllerEfl* GetPopupController() const {
292     return popup_controller_.get();
293   }
294   ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
295   void MoveCaret(const gfx::Point& point);
296   void QuerySelectionStyle();
297   void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
298   void SelectLinkText(const gfx::Point& touch_point);
299   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
300   Eina_Bool ClearSelection();
301
302   // Callback OnCopyFromBackingStore will be called once we get the snapshot
303   // from render
304   void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
305
306   void RenderViewCreated(content::RenderViewHost* render_view_host);
307
308   /**
309    * Creates a snapshot of given rectangle from EWebView
310    *
311    * @param rect rectangle of EWebView which will be taken into snapshot
312    *
313    * @return created snapshot or NULL if error occured.
314    * @note ownership of snapshot is passed to caller
315   */
316   Evas_Object* GetSnapshot(Eina_Rectangle rect);
317
318   bool GetSnapshotAsync(Eina_Rectangle rect,
319                         Ewk_Web_App_Screenshot_Captured_Callback callback,
320                         void* user_data);
321   void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision);
322   void InvokePolicyNavigationCallback(content::RenderViewHost* rvh,
323                                       NavigationPolicyParams params,
324                                       bool* handled);
325   void UseSettingsFont();
326
327   _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
328   Eina_Bool AsyncRequestHitTestDataAt(int x,
329                                       int y,
330                                       Ewk_Hit_Test_Mode mode,
331                                       Ewk_View_Hit_Test_Request_Callback,
332                                       void* user_data);
333   _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x,
334                                                  int y,
335                                                  Ewk_Hit_Test_Mode mode);
336   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
337       int x,
338       int y,
339       Ewk_Hit_Test_Mode mode,
340       Ewk_View_Hit_Test_Request_Callback,
341       void* user_data);
342   void DispatchAsyncHitTestData(const Hit_Test_Params& params,
343                                 int64_t request_id);
344   void UpdateHitTestData(const Hit_Test_Params& params);
345
346   int current_find_request_id() const { return current_find_request_id_; }
347   bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
348   void InvokePlainTextGetCallback(const std::string& content_text,
349                                   int plain_text_get_callback_id);
350   int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback,
351                                      void* user_data);
352   void SetViewGeolocationPermissionCallback(
353       Ewk_View_Geolocation_Permission_Callback callback,
354       void* user_data);
355   bool InvokeViewGeolocationPermissionCallback(
356       _Ewk_Geolocation_Permission_Request*
357           geolocation_permission_request_context,
358       Eina_Bool* result);
359   void SetViewUserMediaPermissionCallback(
360       Ewk_View_User_Media_Permission_Callback callback,
361       void* user_data);
362   bool InvokeViewUserMediaPermissionCallback(
363       _Ewk_User_Media_Permission_Request* user_media_permission_request_context,
364       Eina_Bool* result);
365   void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback,
366                                    void* user_data);
367   bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction,
368                                       Eina_Bool* result);
369   void DidChangeContentsSize(int width, int height);
370   const Eina_Rectangle GetContentsSize() const;
371   void GetScrollSize(int* w, int* h);
372   void StopFinding();
373   void SetProgressValue(double progress);
374   double GetProgressValue();
375   const char* GetTitle();
376   bool SaveAsPdf(int width, int height, const std::string& file_name);
377   void BackForwardListClear();
378   _Ewk_Back_Forward_List* GetBackForwardList() const;
379   void InvokeBackForwardListChangedCallback();
380   _Ewk_History* GetBackForwardHistory() const;
381   bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback,
382                         void* userData);
383   bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback,
384                         void* userData);
385   bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback,
386                          void* userData);
387   void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
388   void InvokeWebAppIconUrlGetCallback(const std::string& iconUrl,
389                                       int callbackId);
390   void InvokeWebAppIconUrlsGetCallback(
391       const std::map<std::string, std::string>& iconUrls,
392       int callbackId);
393   void SetNotificationPermissionCallback(
394       Ewk_View_Notification_Permission_Callback callback,
395       void* user_data);
396   bool IsNotificationPermissionCallbackSet() const;
397   bool InvokeNotificationPermissionCallback(
398       Ewk_Notification_Permission_Request* request);
399
400   bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
401   void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
402   bool IsFullscreen();
403   void ExitFullscreen();
404   double GetScale();
405   void DidChangePageScaleFactor(double scale_factor);
406   void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
407                                   void* user_data);
408   void JavaScriptAlertReply();
409   void SetJavaScriptConfirmCallback(
410       Ewk_View_JavaScript_Confirm_Callback callback,
411       void* user_data);
412   void JavaScriptConfirmReply(bool result);
413   void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback,
414                                    void* user_data);
415   void JavaScriptPromptReply(const char* result);
416   void set_renderer_crashed();
417   void GetPageScaleRange(double* min_scale, double* max_scale);
418   void SetDrawsTransparentBackground(bool enabled);
419   void GetSessionData(const char** data, unsigned* length) const;
420   bool RestoreFromSessionData(const char* data, unsigned length);
421   void ShowFileChooser(content::RenderFrameHost* render_frame_host,
422                        const blink::mojom::FileChooserParams&);
423   void SetBrowserFont();
424   void SetCertificatePem(const std::string& certificate);
425   bool IsDragging() const;
426
427   void RequestColorPicker(int r, int g, int b, int a);
428   void DismissColorPicker();
429   bool SetColorPickerColor(int r, int g, int b, int a);
430   void InputPickerShow(ui::TextInputType input_type, double input_value);
431
432   void ShowContentsDetectedPopup(const char*);
433
434   // Returns TCP port number with Inspector, or 0 if error.
435   int StartInspectorServer(int port = 0);
436   bool StopInspectorServer();
437
438   void LoadNotFoundErrorPage(const std::string& invalidUrl);
439   static std::string GetPlatformLocale();
440   bool GetLinkMagnifierEnabled() const;
441   void SetLinkMagnifierEnabled(bool enabled);
442
443   void SetOverrideEncoding(const std::string& encoding);
444   void SetQuotaPermissionRequestCallback(
445       Ewk_Quota_Permission_Request_Callback callback,
446       void* user_data);
447   void InvokeQuotaPermissionRequest(
448       _Ewk_Quota_Permission_Request* request,
449       content::QuotaPermissionContext::PermissionCallback cb);
450   void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
451                          bool allow);
452   void QuotaRequestCancel(const _Ewk_Quota_Permission_Request* request);
453 #if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
454   void SetViewMode(blink::WebViewMode view_mode);
455 #endif
456   gfx::Point GetContextMenuPosition() const;
457
458   content::ContextMenuControllerEfl* GetContextMenuController() {
459     return context_menu_.get();
460   }
461   void ResetContextMenuController();
462
463   /// ---- Event handling
464   bool HandleShow();
465   bool HandleHide();
466   bool HandleMove(int x, int y);
467   bool HandleResize(int width, int height);
468   bool HandleTextSelectionDown(int x, int y);
469   bool HandleTextSelectionUp(int x, int y);
470
471   void HandleRendererProcessCrash();
472   void InvokeWebProcessCrashedCallback();
473
474   void HandleTapGestureForSelection(bool is_content_editable);
475   void HandleZoomGesture(blink::WebGestureEvent& event);
476   void ClosePage();
477
478   void SyncAcceptLanguages(const std::string& accept_languages);
479
480  private:
481   void InitializeContent();
482   void SendDelayedMessages(content::RenderViewHost* render_view_host);
483
484   void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
485   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(
486       int x,
487       int y,
488       Ewk_Hit_Test_Mode mode,
489       WebViewAsyncRequestHitTestDataCallback* cb);
490
491   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
492
493 #if defined(OS_TIZEN) && !defined(EWK_BRINGUP)
494   static void cameraResultCb(service_h request,
495                              service_h reply,
496                              service_result_e result,
497                              void* data);
498 #endif
499
500 #if defined(OS_TIZEN) && !defined(EWK_BRINGUP)
501   bool LaunchCamera(base::string16 mimetype);
502 #endif
503   content::RenderWidgetHostViewEfl* rwhv() const;
504   JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
505
506   void ReleasePopupMenuList();
507
508   void ShowContextMenuInternal(const content::ContextMenuParams&);
509
510   void UpdateWebkitPreferencesEfl(content::RenderViewHost*);
511
512   void ChangeScroll(int& x, int& y);
513
514   scoped_refptr<WebViewEvasEventHandler> evas_event_handler_;
515   scoped_refptr<Ewk_Context> context_;
516   scoped_refptr<Ewk_Context> old_context_;
517   std::unique_ptr<content::WebContents> web_contents_;
518   std::unique_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
519   std::string pending_url_request_;
520   std::unique_ptr<Ewk_Settings> settings_;
521   std::unique_ptr<_Ewk_Frame> frame_;
522   std::unique_ptr<_Ewk_Policy_Decision> window_policy_;
523   Evas_Object* evas_object_;
524   Evas_Object* native_view_;
525   bool touch_events_enabled_;
526   bool mouse_events_enabled_;
527   double text_zoom_factor_;
528   mutable std::string user_agent_;
529   mutable std::string user_agent_app_name_;
530   std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_;
531
532   Eina_List* popupMenuItems_;
533   Popup_Picker* popupPicker_;
534   bool formIsNavigating_;
535   typedef struct {
536     int count;
537     int position;
538     bool prevState;
539     bool nextState;
540   } formNavigation;
541   formNavigation formNavigation_;
542   std::unique_ptr<content::ContextMenuControllerEfl> context_menu_;
543 #if !defined(EWK_BRINGUP)  // FIXME: m71 bringup
544   std::unique_ptr<content::FileChooserControllerEfl> file_chooser_;
545 #endif
546   std::unique_ptr<content::PopupControllerEfl> popup_controller_;
547   base::string16 previous_text_;
548   int current_find_request_id_;
549   static int find_request_id_counter_;
550
551   typedef WebViewCallback<Ewk_View_Plain_Text_Get_Callback, const char*>
552       EwkViewPlainTextGetCallback;
553   base::IDMap<EwkViewPlainTextGetCallback*> plain_text_get_callback_map_;
554
555   typedef WebViewCallback<Ewk_View_MHTML_Data_Get_Callback, const char*>
556       MHTMLCallbackDetails;
557   base::IDMap<MHTMLCallbackDetails*> mhtml_callback_map_;
558
559   gfx::Size contents_size_;
560   double progress_;
561   mutable std::string title_;
562   mutable std::string pem_certificate_;
563   Hit_Test_Params hit_test_params_;
564   base::WaitableEvent hit_test_completion_;
565   double page_scale_factor_;
566   double x_delta_;
567   double y_delta_;
568
569   WebViewCallback<Ewk_View_Geolocation_Permission_Callback,
570                   _Ewk_Geolocation_Permission_Request*>
571       geolocation_permission_cb_;
572   WebViewCallback<Ewk_View_User_Media_Permission_Callback,
573                   _Ewk_User_Media_Permission_Request*>
574       user_media_permission_cb_;
575   WebViewCallback<Ewk_View_Unfocus_Allow_Callback, Ewk_Unfocus_Direction>
576       unfocus_allow_cb_;
577   WebViewCallback<Ewk_View_Notification_Permission_Callback,
578                   Ewk_Notification_Permission_Request*>
579       notification_permission_callback_;
580   WebViewCallback<Ewk_Quota_Permission_Request_Callback,
581                   const _Ewk_Quota_Permission_Request*>
582       quota_request_callback_;
583
584   std::unique_ptr<content::InputPicker> inputPicker_;
585   base::IDMap<WebApplicationIconUrlGetCallback*>
586       web_app_icon_url_get_callback_map_;
587   base::IDMap<WebApplicationIconUrlsGetCallback*>
588       web_app_icon_urls_get_callback_map_;
589   base::IDMap<WebApplicationCapableGetCallback*>
590       web_app_capable_get_callback_map_;
591   std::unique_ptr<PermissionPopupManager> permission_popup_manager_;
592   std::unique_ptr<ScrollDetector> scroll_detector_;
593
594 #if defined(OS_TIZEN)
595   blink::mojom::FileChooserParams::Mode filechooser_mode_;
596 #endif
597   std::map<const _Ewk_Quota_Permission_Request*,
598            content::QuotaPermissionContext::PermissionCallback>
599       quota_permission_request_map_;
600
601   bool is_initialized_;
602
603   std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_;
604
605   static content::WebContentsEflDelegate::WebContentsCreateCallback
606       create_new_window_web_contents_cb_;
607
608  private:
609   gfx::Vector2d previous_scroll_position_;
610
611   gfx::Point context_menu_position_;
612
613   std::vector<IPC::Message*> delayed_messages_;
614
615   std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
616
617   content::ContentBrowserClientEfl::AcceptLangsChangedCallback
618       accept_langs_changed_callback_;
619 };
620
621 const unsigned int g_default_tilt_motion_sensitivity = 3;
622
623 #endif